/** * Je li trokut pravokutan? */ public bool IsPythagorean() { float a = VertexAB.Length(); float b = VertexBC.Length(); float c = VertexCA.Length(); return(Util.IsPythagorean(a, b, c) || Util.IsPythagorean(a, c, b) || Util.IsPythagorean(b, c, a)); }
public override float Perimeter() { return(VertexAB.Length() + VertexBC.Length() + VertexCA.Length()); }
public override float Area() { float s = Perimeter() / 2; return((float)Math.Sqrt(s * (s - VertexAB.Length()) * (s - VertexBC.Length()) * (s - VertexCA.Length()))); }