public static float getPerimeter(Float2 t1, Float2 t2, Float2 t3) { Float2[] vertices = new Float2[] { t1, t2, t3 }; vertices.OrderBy(v => v.x); float a = (t2 - t1).getLength(); float b = (t3 - t2).getLength(); float c = (t1 - t3).getLength(); return(a + b + c); }