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.
Extended Type:
|
Full Usage:
this.DistanceFromOrigin
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.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:
|
|
|
|
|
|
|
|
Rotate a 2D point Counter Clockwise 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.SqDistanceFromOrigin
Parameters:
unit
Returns: float
Modifiers: inline |
|
|
|
|
|
Full Usage:
this.SqDistanceToXY
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:
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 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.
Extended Type:
|
|
|
|
|
|
|
|
|
|
|
Full Usage:
Pt.distanceToXY (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.projectedParameter (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.projectedParameter (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.projectedParameter (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:
|
|
|
|
|
|
|
|
Rotate a 2D point Counter Clockwise by a 2D Rotation (that has cos and sin precomputed)
Extended Type:
|
|
|
|
|
|
|
Full Usage:
Pt.rotateWithCenterBy cen r pt
Parameters:
Pt
r : Rotation2D
pt : Pt
Returns: Pt
Modifiers: inline |
Rotate the 2D point around a center 2D point. Counter Clockwise. By a 2D Rotation (that has cos and sin precomputed)
Extended Type:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Full Usage:
Pt.sqDistanceToXY (x, y) p
Parameters:
float
y : float
p : Pt
Returns: float
Modifiers: inline |
|
|
|
|
|
|
|
|
|
|
Euclid