Class PointMathExtensions
- Namespace
- Splat
- Assembly
- Splat.dll
Extension methods which extend the point mathematics.
- Inheritance
-
Point
Math Extensions
Methods
AngleInDegrees(PointF)
Calculates the angle in degrees of a PointF.
Parameters
value
PointFThe point value to use for the calculation.
Returns
- float
The angle that has been generated.
DistanceTo(PointF, PointF)
Calculates the distance between two points.
Parameters
value
PointFThe point value to use for the calculation.
other
PointFThe other point to generate for.
Returns
- float
The distance to the other point.
DotProduct(PointF, PointF)
Calculates the Dot product of two points.
Parameters
value
PointFThe point value to use for the calculation.
other
PointFThe point to perform the dot product against.
Returns
- float
The calculated dot product.
Floor(Point)
Floor the specified point (i.e. round it to integer values).
Parameters
value
PointThe point value to use for the calculation.
Returns
- PointF
The point that has been floored.
Length(PointF)
Calculates the magnitude of a point from (0,0).
Parameters
value
PointFThe point value to use for the calculation.
Returns
- float
The length of the point.
Normalize(PointF)
Normalize the specified PointF (i.e. makes its magnitude = 1.0f).
Parameters
value
PointFThe point value to use for the calculation.
Returns
- PointF
The normalized point.
ProjectAlong(PointF, PointF)
Projects a PointF along a specified direction.
Parameters
value
PointFThe point value to use for the calculation.
direction
PointFThe point containing the direction.
Returns
- PointF
The projected point.
ProjectAlongAngle(PointF, float)
Projects a PointF along a specified angle.
Parameters
value
PointFThe point value to use for the calculation.
angleInDegrees
floatThe angle in degrees to perform the projection against.
Returns
- PointF
The point that has been projected.
ScaledBy(PointF, float)
Scales a PointF by a scalar factor.
Parameters
Returns
- PointF
The scaled point.
WithinEpsilonOf(PointF, PointF, float)
Determines whether two points are within 'epsilon' of each other.
Parameters
value
PointFThe point value to use for the calculation.
other
PointFThe point to compare against.
epsilon
floatThe tolerated epsilon value.
Returns
- bool
If the value is equal based on the epsilon.