Telogis.GeoBase.Point |
Represents a 2D spatial coordinate pair.
Name | Description |
---|---|
Point(x, y) | Arguments
|
Name | Description |
---|---|
add (Point other) | Performs component-wise addition of another Point to the calling one. The result is saved in the calling point, but a reference is returned for convenience. Arguments
Point - The calling point, once Point.add.other has been added to it. |
distSqr (Point other) | Calculates the squared linear distance between the calling Point and another. Arguments
Number - The squared distance in pixels between the calling Point and Point.distSqr.other. |
equals (Point other, Number tolerance) | Determines whether the calling Point is equivalent to another, component-wise. Arguments
Boolean - True if the components of the calling Point and Point.equals.other are equivalent; false otherwise. |
isValid () | Returns true if point is valid. |
midPoint (Point other) | Finds the mid-point of the line segment defined by the calling Point and another. Does not modify the calling point. Arguments
Point - The mid-point of the line segment from the calling Point to Point.midPoint.other. |
multiply (Number scalar) | Performs component-wise multiplication of the calling Point by a given scalar value. The result is saved in the calling point, but a reference is returned for convenience. Arguments
Point - The calling point, once scaled by Point.multiply.scalar. |
rotateByDegrees (Number degrees, Point origin) | Rotates, in degrees, this point around an origin. The result is saved in the calling point, but a reference is returned for convenience. Arguments
Point - The calling point, with the rotation applied. |
rotateByRadians (Number radians, Point origin) | Rotates, in radians, this point around an origin. The result is saved in the calling point, but a reference is returned for convenience. Arguments
Point - The calling point, with the rotation applied. |
rotateByRadians (Number scaleFactor, Point origin) | Scales a vector, with respect to a given origin. The result is saved in the calling point, but a reference is returned for convenience. Arguments
Point - The calling point, with the scale applied. |
round () | Rounds the components of the calling Point to the nearest integer. A reference to the point is returned for convenience. ReturnsPoint - A reference to the calling point, once rounded. |
subtract (Point other) | Performs component-wise subtraction of another Point from the calling one. The result is saved in the calling point, but a reference is returned for convenience. Arguments
Point - The calling point, once Point.subtract.other has been subtracted from it. |
toString () | Gets a string representation of the current point. ReturnsString - A string of the form '($x, $y)'. |