Contains methods for manipulating points in generic code.
Using PointMath extension methods is easier. These methods may be faster but they require a "math" structure (see Maths{T}).
|
static Point | Add< Point, T, M > (this M m, Point a, Point b) |
| Returns the sum of two vectors. More...
|
|
static IPoint< T > | Subtract< T, M > (this M m, IPoint< T > a, IPoint< T > b) |
| Returns the difference between two points or vectors. More...
|
|
static IPoint< T > | Multiply< T, M > (this M m, IPoint< T > a, T factor) |
| Returns a point or vector multiplied by a scaling factor. More...
|
|
static IPoint< T > | Divide< T, M > (this M m, IPoint< T > a, T factor) |
| Returns a point or vector divided by a scaling factor. More...
|
|
static IPoint< T > | ShiftLeft< T, M > (this M m, IPoint< T > a, int amount) |
| Returns a point or vector scaled up by a power of two. More...
|
|
static IPoint< T > | ShiftRight< T, M > (this M m, IPoint< T > a, int amount) |
| Returns a point or vector scaled down by a power of two. More...
|
|
static IPoint< T > | MulDiv< T, M > (this M m, IPoint< T > a, T mulBy, T divBy) |
| Returns a point or vector by a factor, then divides by another factor. More...
|
|
static T | Dot< T, M > (this M m, IPoint< T > a, IPoint< T > b) |
| Gets the dot product of two vectors. More...
|
|
static T | Cross< T, M > (this M m, IPoint< T > a, IPoint< T > b) |
| Gets the cross product of two vectors. More...
|
|
static IPoint< T > | Rot90< T, M > (this M m, IPoint< T > p) |
| Returns a vector rotated 90 degrees. More...
|
|
static IPoint< T > | Negate< T, M > (this M m, IPoint< T > p) |
| Returns a vector with its direction reversed. More...
|
|
static T | Quadrance< T, M > (this M m, IPoint< T > p) |
| Gets the square of the length of a vector. More...
|
|
static T | Length< T, M > (this M m, IPoint< T > p) |
| Gets the length of a vector. More...
|
|
static T | Angle< T, M > (this M m, IPoint< T > p) |
| Gets the angle from 0 to 2*PI of the vector, where (1,0) has angle 0 and (0,1) has angle PI/2. More...
|
|