8 /// A right angle triangle.
11 public class Triangle: IComparable<Triangle> {
14 /// A side of the triangle.
16 public double A {get; set;}
18 /// A side of the triangle.
20 public double B {get; set;}
23 /// A side of the triangle.
27 return Math.Sqrt(A*A + B*B);
32 /// The area of the triangle.
44 public override string ToString() {
45 return $"A: {A:f2} \tB: {B:f2} \tC: {C:f2} \tS: {S:f2}";
48 int IComparable<Triangle>.CompareTo(Triangle other) {
49 return (other.S/other.C).CompareTo(S/C);
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list