Example #1
0
        /**
         * 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));
        }
Example #2
0
 public override float Perimeter()
 {
     return(VertexAB.Length() + VertexBC.Length() + VertexCA.Length());
 }
Example #3
0
        public override float Area()
        {
            float s = Perimeter() / 2;

            return((float)Math.Sqrt(s * (s - VertexAB.Length()) * (s - VertexBC.Length()) * (s - VertexCA.Length())));
        }