private float calcPosition(Vector2 topLeft, Vector2 bottomRight, Vector2 pointA) { float vx1 = bottomRight.x - topLeft.x; float vy1 = bottomRight.y - topLeft.y; float vx2 = pointA.x - topLeft.x; float vy2 = pointA.y - topLeft.y; return vx1 * vy2 - vy1 * vx2; }