AutoOpenPt Module
When Euclid is opened this module will be auto-opened. It only contains extension members for type Pt.
Type extensions
| Type extension |
Description
|
|
|
|
|
|
|
|
|
|
|
|
Returns the Diamond Angle from this point to another point. 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. Fails if the two points are coincident or too close together. The static counterpart is Pt.directionDiamondFromTo.
Extended Type:
|
Full Usage:
this.DistanceFromOrigin
Parameters:
unit
Returns: float
Modifiers: inline |
|
Full Usage:
this.DistanceFromOriginSq
Parameters:
unit
Returns: float
Modifiers: inline |
|
|
|
|
|
|
|
|
|
Full Usage:
this.DistanceToXY
Parameters:
float
y : float
Returns: float
Modifiers: inline |
Returns the distance between a 2D point and given x, y coordinates.
Extended Type:
|
Full Usage:
this.DistanceToXYSq
Parameters:
float
y : float
Returns: float
Modifiers: inline |
Returns the squared distance between a 2D point and given x, y coordinates.
Extended Type:
|
Full Usage:
this.IsAlmostOrigin
Parameters:
float
Returns: bool
Modifiers: inline |
Returns a boolean indicating whether the absolute value of X and Y is each less than the given tolerance.
Extended Type:
|
Full Usage:
this.IsInvalid
Parameters:
unit
Returns: bool
Modifiers: inline |
Returns a boolean indicating whether X or Y is NaN or Infinity.
Extended Type:
|
Full Usage:
this.IsNotOrigin
Parameters:
unit
Returns: bool
Modifiers: inline |
Returns a boolean indicating if any of X and Y is not exactly 0.0.
Extended Type:
|
Full Usage:
this.IsOrigin
Parameters:
unit
Returns: bool
Modifiers: inline |
Returns a boolean indicating whether X and Y are exactly 0.0.
Extended Type:
|
Full Usage:
this.IsValid
Parameters:
unit
Returns: bool
Modifiers: inline |
Returns a boolean indicating whether X and Y are both valid (not NaN or Infinity).
Extended Type:
|
Full Usage:
this.Rotate
Parameters:
Rotation2D
-
The rotation to apply.
Returns: Pt
The rotated 2D point.
Modifiers: inline |
Rotate the 2D point counter-clockwise around the World Origin by a 2D Rotation (that has cos and sin precomputed).
Extended Type:
|
|
|
|
|
Full Usage:
this.RotateAround
Parameters:
Pt
-
The center point of the rotation.
r : Rotation2D
-
The rotation to apply.
Returns: Pt
The rotated 2D point.
Modifiers: inline |
Rotate the 2D point counter-clockwise around a center point by a 2D Rotation (that has cos and sin precomputed).
Extended Type:
|
Full Usage:
this.RotateByQuarterCircle
Parameters:
int
Returns: Pt
Modifiers: inline |
|
Full Usage:
this.RotateDegrees
Parameters:
float
-
The rotation angle in degrees.
Returns: Pt
The rotated 2D point.
Modifiers: inline |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Full Usage:
Pt.createFromMembersXY pt
Parameters:
^T
Returns: Pt
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:
Pt.createFromMembersxy pt
Parameters:
^T
Returns: Pt
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)) |
|
|
|
|
|
|
|
|
|
|
|
|
Returns the Diamond Angle from 'fromPt' to 'toPt'. 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. Fails if the two points are coincident or too close together. The instance counterpart is Pt.DirectionDiamondTo.
Extended Type:
|
|
|
|
|
|
|
|
|
|
|
|
|
Full Usage:
Pt.distanceToXY x y p
Parameters:
float
y : float
p : Pt
Returns: float
Modifiers: inline |
|
Full Usage:
Pt.distanceToXYSq x y p
Parameters:
float
y : float
p : Pt
Returns: float
Modifiers: inline |
|
|
|
|
|
|
|
|
|
|
|
Full Usage:
Pt.isAlmostOrigin tol pt
Parameters:
float
pt : Pt
Returns: bool
Modifiers: inline |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Full Usage:
Pt.projectedParameterBetweenPts fromPt toPt testPt
Parameters:
Pt
-
The start point defining the endless line.
toPt : Pt
-
The end point defining the direction of the endless line.
testPt : Pt
-
The point to be projected onto the line.
Returns: float
The parameter along the line direction (fromPt to toPt) at which the projection of testPt falls.
A value of 0.0 corresponds to fromPt, 1.0 corresponds to toPt.
Modifiers: inline |
Projects a test point onto an endless line defined by two points.
Extended Type:
|
Full Usage:
Pt.projectedParameterOnUnitVc fromPt uv testPt
Parameters:
Pt
-
The origin point of the endless line.
uv : UnitVc
-
The unit direction vector describing the orientation of the endless line.
testPt : Pt
-
The point to be projected onto the line.
Returns: float
The parameter (scalar value) along the unit vector at which the projection of testPt falls on the line.
Modifiers: inline |
Projects a test point onto an endless line defined by an origin point and a unit direction vector.
Extended Type:
|
Full Usage:
Pt.projectedParameterOnVc fromPt v testPt
Parameters:
Pt
-
The origin point of the endless line.
v : Vc
-
The direction vector of the endless line. Does not need to be unitized.
testPt : Pt
-
The point to be projected onto the line.
Returns: float
The parameter (scaling factor for the direction vector) at which the projection of testPt falls on the line.
Modifiers: inline |
Projects a test point onto an endless line defined by an origin point and a direction vector.
Extended Type:
|
Full Usage:
Pt.rotate r p
Parameters:
Rotation2D
-
The rotation to apply.
p : Pt
-
The 2D point to rotate.
Returns: Pt
The rotated 2D point.
Modifiers: inline |
Rotate a 2D point counter-clockwise around the World Origin by a 2D Rotation (that has cos and sin precomputed).
Extended Type:
|
|
|
|
|
Full Usage:
Pt.rotateAround cen r pt
Parameters:
Pt
-
The center point of the rotation.
r : Rotation2D
-
The rotation to apply.
pt : Pt
-
The 2D point to rotate.
Returns: Pt
The rotated 2D point.
Modifiers: inline |
Rotate a 2D point counter-clockwise around a center point by a 2D Rotation (that has cos and sin precomputed).
Extended Type:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Euclid