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.
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.Direction180
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.Direction2Pi
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.Direction360
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.DirectionDiamond
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.DirectionPi
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 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 minium cosine value. See Euclid.Cosine module.
Extended Type:
|
Full Usage:
this.IsParallelAndOrientedTo
Parameters:
Vc
minCosine : float<MeasureProduct<cosine, MeasureOne>>
Returns: bool
Modifiers: inline |
Checks if this 2D unit-vectors 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 minium 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 minium cosine value. See Euclid.Cosine module.
Extended Type:
|
Full Usage:
this.IsParallelTo
Parameters:
Vc
minCosine : float<MeasureProduct<cosine, MeasureOne>>
Returns: bool
Modifiers: inline |
Checks if this 2D unit-vectors 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 minium 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 minium cosine value. The default cosine is 0.0043633 ( = 89.75 deg) See Euclid.Cosine module.
Extended Type:
|
Full Usage:
this.IsPerpendicularTo
Parameters:
Vc
maxCosine : float<MeasureProduct<cosine, MeasureOne>>
Returns: bool
Modifiers: inline |
Checks if this 2D unit-vectors 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 minium 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 Y axis is 1e-9.
Extended Type:
|
Full Usage:
this.IsXAligned
Returns: bool
Modifiers: inline |
Checks if 2D unit-vector is parallel to the world X axis. Ignoring orientation. The absolute deviation tolerance along Y axis is 1e-9.
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 X axis is 1e-9.
Extended Type:
|
Full Usage:
this.IsYAligned
Returns: bool
Modifiers: inline |
Checks if 2D unit-vector is parallel to the world Y axis. Ignoring orientation. The absolute deviation tolerance along X axis is 1e-9.
Extended Type:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Rotate the a 2D unit-vector Counter Clockwise by a 2D Rotation (that has cos and sin precomputed)
Extended Type:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
Extended Type:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Full Usage:
UnitVc.createFromMembersXY vec
Parameters:
^T
Returns: UnitVc
Modifiers: inline Type parameters: ^T, ^a, ^b |
|
Full Usage:
UnitVc.createFromMembersxy vec
Parameters:
^T
Returns: UnitVc
Modifiers: inline Type parameters: ^T, ^a, ^b |
|
|
|
|
|
|
The 2D Cross Product. It is also known as the Determinant, Wedge Product or Outer Product. 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.
Extended Type:
|
|
The 2D Cross Product. It is also known as the Determinant, Wedge Product or Outer Product. 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.
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-vector. This float of unit-vectors is the Cosine of the angle between the two vectors. Returns a float with a 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:
UnitVc.intersection (ptA, ptB, vA, vB, relAngleDiscriminant)
Parameters:
Pt
-
The start point of the first line.
ptB : Pt
-
The start point of the second line.
vA : UnitVc
-
The unit-vector of the first line.
vB : UnitVc
-
The unit-vector of the second line.
relAngleDiscriminant : float<MeasureProduct<relAngDiscr, MeasureOne>>
-
This is an optional tolerance for the internally calculated relative Angle Discriminant.
The default value corresponds to approx 0.25 degree. Below this angle vectors are considered parallel.
See module Euclid.UtilEuclid.RelAngleDiscriminant
Returns: ValueOption<float * float>
For (almost) zero length or (almost) parallel vectors: ValueNone
Else ValueSome with a tuple of the parameters at which the two infinite 2D Lines intersect to each other.
The tuple's order corresponds to the input order.
|
Intersects two infinite 2D lines. The lines are defined by a start point and a vector.
Extended Type:
|
Full Usage:
UnitVc.isAngle180Above cosineValue a b
Parameters:
float<MeasureProduct<cosine, MeasureOne>>
a : UnitVc
b : UnitVc
Returns: bool
Modifiers: inline |
Checks if Angle between two unit-vectors is more than given Cosine. Does not ignores vector orientation.The angle between two vectors can be 0 to 180 degrees. Use the Euclid.Cosine module to get some precomputed cosine values.
Extended Type:
|
Full Usage:
UnitVc.isAngle180Below cosineValue a b
Parameters:
float<MeasureProduct<cosine, MeasureOne>>
a : UnitVc
b : UnitVc
Returns: bool
Modifiers: inline |
Checks if Angle between two unit-vectors is less than given Cosine. Does not ignores vector orientation. The angle between two vectors can be 0 to 180 degrees. Use the Euclid.Cosine module to get some precomputed cosine values.
Extended Type:
|
Full Usage:
UnitVc.isAngle90Above cosineValue a b
Parameters:
float<MeasureProduct<cosine, MeasureOne>>
a : UnitVc
b : UnitVc
Returns: bool
Modifiers: inline |
Checks if Angle between two unit-vectors is more than given Cosine. Ignores vector orientation. The angle between two vectors can be 0 to 90 degrees ignoring their direction. Use the Euclid.Cosine module to get some precomputed cosine values.
Extended Type:
|
Full Usage:
UnitVc.isAngle90Below cosineValue a b
Parameters:
float<MeasureProduct<cosine, MeasureOne>>
a : UnitVc
b : UnitVc
Returns: bool
Modifiers: inline |
Checks if Angle between two unit-vectors is less than given Cosine. Ignores vector orientation. The angle between two vectors can be 0 to 90 degrees ignoring their direction. Use the Euclid.Cosine module to get some precomputed cosine values.
Extended Type:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Full Usage:
UnitVc.rotateBy r v
Parameters:
Rotation2D
v : UnitVc
Returns: UnitVc
Modifiers: inline |
Rotate the a 2D unit-vector Counter Clockwise by a 2D Rotation (that has cos and sin precomputed)
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 0.1
Extended Type:
|
|
|
|
|
|
|
|
|
|
|
|
|
|