AutoOpenUnitVc Module
When Euclid is opened this module will be auto-opened. It only contains extension members for type UnitVc.
Type extensions
| Type extension |
Description
|
|
Returns positive angle for rotating counter-clockwise from this vector to vector 'b' . In Diamond Angle. Using only proportion of X to Y components. Range of 0.0 to 4.0 (for 360 degrees) It is the fastest angle calculation since it does not involve Cosine or ArcTangent functions. The static counterpart is UnitVc.angleDiamond.
Extended Type:
|
|
|
|
|
|
|
|
|
|
The 2D Cross Product of two 2D unit-vectors. It is also known as the Determinant, or the sine of the angle between the two vectors. 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.
Extended Type:
|
Full Usage:
this.Direction180
Parameters:
unit
Returns: float
Modifiers: inline |
Returns the angle in degrees from X-axis, Ignores orientation. Range 0.0 to 180.
Extended Type:
|
Full Usage:
this.Direction2Pi
Parameters:
unit
Returns: float
Modifiers: inline |
Returns the angle in radians from X-axis, Going counter-clockwise till two Pi.
Extended Type:
|
Full Usage:
this.Direction360
Parameters:
unit
Returns: float
Modifiers: inline |
Returns the angle in degrees from X-axis. Going counter-clockwise till 360.
Extended Type:
|
Full Usage:
this.DirectionDiamond
Parameters:
unit
Returns: float
Modifiers: inline |
The diamond angle. Calculates the proportion of X to Y component. It is always positive and in the range of 0.0 to 4.0 (for 360 degrees) 0.0 = XAxis, going counter-clockwise. It is the fastest angle calculation since it does not involve Cosine or ArcTangent functions.
Extended Type:
|
Full Usage:
this.DirectionPi
Parameters:
unit
Returns: float
Modifiers: inline |
Returns the angle in radians from X-axis, Ignores orientation. Range 0.0 to Pi.
Extended Type:
|
Full Usage:
this.DotCosine
Parameters:
UnitVc
Returns: float<MeasureProduct<cosine, MeasureOne>>
Modifiers: inline |
Dot product, or scalar product of two 2D unit-vectors. This float of unit-vectors is the Cosine of the angle between the two vectors. Returns a float with a F# unit of Measure Euclid.Cosine.cosine. This is useful for comparing the angle to precomputed values in the Euclid.Cosine module.
Extended Type:
|
|
|
|
|
Full Usage:
this.IsParallelAndOrientedTo
Parameters:
UnitVc
minCosine : float<MeasureProduct<cosine, MeasureOne>>
Returns: bool
Modifiers: inline |
Checks if two 2D unit-vectors are parallel. Takes the line orientation into account too. The default angle tolerance is 0.25 degrees. This tolerance can be customized by an optional minimum cosine value. See Euclid.Cosine module. The static counterpart is UnitVc.areParallelAndOriented.
Extended Type:
|
Full Usage:
this.IsParallelAndOrientedTo
Parameters:
Vc
minCosine : float<MeasureProduct<cosine, MeasureOne>>
Returns: bool
Modifiers: inline |
Checks if this 2D unit vector and a 2D vector are parallel. Takes the line orientation into account too. The default angle tolerance is 0.25 degrees. This tolerance can be customized by an optional minimum cosine value. See Euclid.Cosine module.
Extended Type:
|
Full Usage:
this.IsParallelTo
Parameters:
UnitVc
minCosine : float<MeasureProduct<cosine, MeasureOne>>
Returns: bool
Modifiers: inline |
Checks if two 2D unit-vectors are parallel. Ignores the line orientation. The default angle tolerance is 0.25 degrees. This tolerance can be customized by an optional minimum cosine value. See Euclid.Cosine module. The static counterpart is UnitVc.areParallel.
Extended Type:
|
Full Usage:
this.IsParallelTo
Parameters:
Vc
minCosine : float<MeasureProduct<cosine, MeasureOne>>
Returns: bool
Modifiers: inline |
Checks if this 2D unit vector and a 2D vector are parallel. Ignores the line orientation. The default angle tolerance is 0.25 degrees. This tolerance can be customized by an optional minimum cosine value. See Euclid.Cosine module.
Extended Type:
|
Full Usage:
this.IsPerpendicularTo
Parameters:
UnitVc
maxCosine : float<MeasureProduct<cosine, MeasureOne>>
Returns: bool
Modifiers: inline |
Checks if two 2D unit-vectors are perpendicular to each other. The default angle tolerance is 89.75 to 90.25 degrees. This tolerance can be customized by an optional maximum cosine value. The default cosine is 0.0043633 ( = 89.75 deg) See Euclid.Cosine module. The static counterpart is UnitVc.arePerpendicular.
Extended Type:
|
Full Usage:
this.IsPerpendicularTo
Parameters:
Vc
maxCosine : float<MeasureProduct<cosine, MeasureOne>>
Returns: bool
Modifiers: inline |
Checks if this 2D unit vector and a 2D vector are perpendicular to each other. The default angle tolerance is 89.75 to 90.25 degrees. This tolerance can be customized by an optional maximum cosine value. The default cosine is 0.0043633 ( = 89.75 deg) See Euclid.Cosine module.
Extended Type:
|
Full Usage:
this.IsXAligned
Parameters:
unit
Returns: bool
Modifiers: inline |
Checks if 2D unit-vector is parallel to the world X-axis. Ignoring orientation. The absolute deviation tolerance along the Y-axis is 1e-9 (axisAlignmentTolerance).
Extended Type:
|
Full Usage:
this.IsYAligned
Parameters:
unit
Returns: bool
Modifiers: inline |
Checks if 2D unit-vector is parallel to the world Y-axis. Ignoring orientation. The absolute deviation tolerance along the X-axis is 1e-9 (axisAlignmentTolerance).
Extended Type:
|
|
|
|
|
Full Usage:
this.Rotate
Parameters:
Rotation2D
-
The rotation to apply.
Returns: UnitVc
The rotated 2D unit-vector.
Modifiers: inline |
Rotate the 2D unit-vector counter-clockwise by a 2D Rotation (that has cos and sin precomputed).
Extended Type:
|
|
|
|
|
Full Usage:
this.RotateByQuarterCircle
Parameters:
int
Returns: UnitVc
Modifiers: inline |
|
Full Usage:
this.RotateDegrees
Parameters:
float
-
The rotation angle in degrees.
Returns: UnitVc
The rotated 2D unit-vector.
Modifiers: inline |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Returns positive angle for rotating counter-clockwise from vector 'a' to vector 'b' . In Diamond Angle. Using only proportion of X to Y components. Range of 0.0 to 4.0 (for 360 degrees) It is the fastest angle calculation since it does not involve Cosine or ArcTangent functions. The instance counterpart is UnitVc.AngleDiamondTo.
Extended Type:
|
|
|
|
|
|
|
|
|
Full Usage:
UnitVc.areParallel minCosine a b
Parameters:
float<MeasureProduct<cosine, MeasureOne>>
a : UnitVc
b : UnitVc
Returns: bool
Modifiers: inline |
Checks if two 2D unit-vectors are parallel. Ignores the line orientation. The default angle tolerance is 0.25 degrees. This tolerance can be customized by an optional minimum cosine value. See Euclid.Cosine module. The instance counterpart is UnitVc.IsParallelTo.
Extended Type:
|
Full Usage:
UnitVc.areParallelAndOriented minCosine a b
Parameters:
float<MeasureProduct<cosine, MeasureOne>>
a : UnitVc
b : UnitVc
Returns: bool
Modifiers: inline |
Checks if two 2D unit-vectors are parallel. Takes the line orientation into account too. The default angle tolerance is 0.25 degrees. This tolerance can be customized by an optional minimum cosine value. See Euclid.Cosine module. The instance counterpart is UnitVc.IsParallelAndOrientedTo.
Extended Type:
|
Full Usage:
UnitVc.arePerpendicular maxCosine a b
Parameters:
float<MeasureProduct<cosine, MeasureOne>>
a : UnitVc
b : UnitVc
Returns: bool
Modifiers: inline |
Checks if two 2D unit-vectors are perpendicular to each other. The default angle tolerance is 89.75 to 90.25 degrees. This tolerance can be customized by an optional maximum cosine value. The default cosine is 0.0043633 ( = 89.75 deg) See Euclid.Cosine module. The instance counterpart is UnitVc.IsPerpendicularTo.
Extended Type:
|
|
|
|
|
|
|
|
|
|
|
Full Usage:
UnitVc.createFromMembersXY vec
Parameters:
^T
Returns: UnitVc
Modifiers: inline Type parameters: ^T, ^a, ^b (requires (member get_X : ^T -> ^a) and (member get_Y : ^T -> ^b) and (static member op_Explicit : ^a -> Microsoft.FSharp.Core.float) and (static member op_Explicit : ^b -> Microsoft.FSharp.Core.float)) |
|
Full Usage:
UnitVc.createFromMembersxy vec
Parameters:
^T
Returns: UnitVc
Modifiers: inline Type parameters: ^T, ^a, ^b (requires (member get_x : ^T -> ^a) and (member get_y : ^T -> ^b) and (static member op_Explicit : ^a -> Microsoft.FSharp.Core.float) and (static member op_Explicit : ^b -> Microsoft.FSharp.Core.float)) |
|
|
|
|
|
|
|
|
|
|
The 2D Cross Product of a 2D vector with a 2D unit-vector. It is also known as the Determinant, or the sine of the angle between the two vectors. 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.
Extended Type:
|
|
|
|
|
|
|
|
|
|
|
|
The diamond angle. Calculates the proportion of X to Y component. It is always positive and in the range of 0.0 to 4.0 (for 360 degrees) 0.0 = XAxis, going counter-clockwise. It is the fastest angle calculation since it does not involve Cosine or ArcTangent functions.
Extended Type:
|
|
|
Full Usage:
UnitVc.dotCosine a b
Parameters: Returns: float<MeasureProduct<cosine, MeasureOne>>
Modifiers: inline |
Dot product, or scalar product of two 2D unit-vectors. This float of unit-vectors is the Cosine of the angle between the two vectors. Returns a float with a F# unit of Measure Euclid.Cosine.cosine. This is useful for comparing the angle to precomputed values in the Euclid.Cosine module.
Extended Type:
|
|
|
|
|
|
Checks if two 2D unit-vectors are equal within tolerance. Identical unit-vectors in opposite directions are not considered equal. The tolerance applies to the X and Y components separately, not to the Euclidean distance between the tips. Use UnitVc.equalsExact to check for an exact match.
Extended Type:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Full Usage:
UnitVc.rotate r v
Parameters:
Rotation2D
-
The rotation to apply.
v : UnitVc
-
The 2D unit-vector to rotate.
Returns: UnitVc
The rotated 2D unit-vector.
Modifiers: inline |
Rotate a 2D unit-vector counter-clockwise by a 2D Rotation (that has cos and sin precomputed).
Extended Type:
|
|
|
|
|
|
Rotates the 2D unit-vector by a given number of quarter-circles (i.e. multiples of 90 degrees or Pi/2 radians). A positive number rotates counter-clockwise, a negative number rotates clockwise. The length of the vector is preserved.
Extended Type:
|
|
Rotate a 2D unit-vector counter-clockwise by an angle in degrees. For better performance precompute the Rotation2D struct and rotate with UnitVc.rotate.
Extended Type:
|
|
|
|
|
|
Sine of the signed angle from a to b: positive counter-clockwise, negative clockwise. This is the 2D cross product. Unlike UnitVec.sine, it carries an orientation sign.
Extended Type:
|
|
Spherically interpolates between start and end by amount rel (0.0 to 1.0). The difference between this and linear interpolation (aka, "lerp") is that the vectors are treated as directions rather than points in space. The direction of the returned vector is interpolated by the angle and its magnitude is interpolated between the magnitudes of start and end. Interpolation continues before and after the range of 0.0 and 1.0
Extended Type:
|
|
|
|
|
|
|
|
Tangent of the signed angle from a to b, positive angles being counter-clockwise. Calculated as the signed cross product divided by the dot product; reversing the inputs reverses the sign. Unlike UnitVec.tangent, orientation contributes to the sign. May return Infinity at 90 or 270 degrees.
Extended Type:
|
|
|
|
|
|
Euclid