C# Class Methods.LineSweepPoint.GeometryUtil

Afficher le fichier Open project: Strilanc/Methods

Méthodes publiques

Méthode Description
LerpProjectOnto ( this point, LineSegment line ) : double

The proportion that, when lerped across the given line, results in the given point. If the point is not on the line segment, the result is the closest point on the extended line.

QuadraticRoots ( double a, double b, double c ) : IEnumerable

Enumerates the real solutions to the formula a*x^2 + b*x + c = 0. Handles degenerate cases. If a=b=c=0 then only zero is enumerated, even though technically all real numbers are solutions.

WhenLineSweepsPoint ( LineSegment pathOfLineStartPoint, LineSegment pathOfLineEndPoint, Point point ) : IEnumerable

Enumerates the times and places, if any, where a moving line crosses a point during a time step. The line's endpoints move at a constant rate along their linear paths.

Method Details

LerpProjectOnto() public static méthode

The proportion that, when lerped across the given line, results in the given point. If the point is not on the line segment, the result is the closest point on the extended line.
public static LerpProjectOnto ( this point, LineSegment line ) : double
point this
line LineSegment
Résultat double

QuadraticRoots() public static méthode

Enumerates the real solutions to the formula a*x^2 + b*x + c = 0. Handles degenerate cases. If a=b=c=0 then only zero is enumerated, even though technically all real numbers are solutions.
public static QuadraticRoots ( double a, double b, double c ) : IEnumerable
a double
b double
c double
Résultat IEnumerable

WhenLineSweepsPoint() public static méthode

Enumerates the times and places, if any, where a moving line crosses a point during a time step. The line's endpoints move at a constant rate along their linear paths.
public static WhenLineSweepsPoint ( LineSegment pathOfLineStartPoint, LineSegment pathOfLineEndPoint, Point point ) : IEnumerable
pathOfLineStartPoint LineSegment
pathOfLineEndPoint LineSegment
point Point
Résultat IEnumerable