UnitVc Type
A struct containing 2 floats, representing an 2D unitized vector. All instances of this type are guaranteed to be always unitized. Never use the struct default constructor UnitVc()! It will create an invalid zero length vector. Use UnitVc.create or UnitVc.createUnchecked instead.
3D unit-vectors are called 'UnitVec'
Record fields
| Record Field |
Description
|
Full Usage:
X
Field type: float
|
Gets the X part of this 2D unit-vector.
|
Full Usage:
Y
Field type: float
|
Gets the Y part of this 2D unit-vector.
|
Instance members
| Instance member |
Description
|
Full Usage:
this.AsFSharpCode
Returns: string
|
Format 2D unit-vector into an F# code string that can be used to recreate the unit-vector.
|
Full Usage:
this.AsString
Returns: string
|
Format 2D unit-vector into string with nice floating point number formatting of X and Y But without full type name as in v.ToString()
|
Static members
| Static member |
Description
|
|
|
Full Usage:
UnitVc.createUnchecked (x, y)
Parameters:
float
y : float
Returns: UnitVc
Modifiers: inline |
For use as a faster constructor. Requires correct input of unitized values.
|
|
The 2D Cross Product. It is also known as the Determinant, or the sine of the angle between the two vectors. In 2D it is just a scalar equal to the signed area of the parallelogram spanned by the input vectors. If the rotation from 'a' to 'b' is Counter-Clockwise the result is positive. For unit-vectors this is the same as the sine of the angle between the two vectors. (while the dot product is the cosine)
|
|
Euclid