public SlopeInterceptEquation(Vector2 pointA, Vector2 pointB) { Vector2 direction = pointB - pointA; if (direction.y == 0) { M = 0; } else { M = Hedra.RoundDecimals(direction.y, 3) / Hedra.RoundDecimals(direction.x, 3); } B = pointA.y - M * pointA.x; }