UnitVc Type
UnitVc is an immutable 2D unit-vector. it is guaranteed to be 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 X part of this 2D unit-vector.
|
Instance members
Instance member |
Description
|
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, Wedge Product or Outer Product. In 2D it is just a scalar equal to the signed square 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)
|
|