Name | Type | Default | Description |
---|---|---|---|
x | number | 0 | optional |
y | number | 0 | optional |
Example
Example usage of Point.
// new Point
const {Point} = next2d.geom;
const point = new Point();
Members
指定されたクラスの空間名を返します。
Returns the space name of the specified class.- Default Value:
- next2d.geom.Point
(0,0) からこのポイントまでの線のセグメントの長さです。
The length of the line segment from (0,0) to this point.- Default Value:
- 0
指定されたオブジェクトの空間名を返します。
Returns the space name of the specified object.- Default Value:
- next2d.geom.Point
ポイントの水平座標です。
The horizontal coordinate of the point.- Default Value:
- 0
ポイントの垂直座標です。
The vertical coordinate of the point.- Default Value:
- 0
Methods
point1 と point2 との距離を返します。
Returns the distance between point1 and point2.Name Type Description point1
Point point2
Point Returns:
Type Description number 2 つの指定されたポイント間にあるポイントを判別します。
Determines a point between two specified points.Name Type Description point1
Point point2
Point f
number Returns:
Type Description Point 極座標ペアを直交点座標に変換します。
Converts a pair of polar coordinates to a Cartesian point coordinate.Name Type Description len
number angle
number Returns:
Type Description Point 指定されたクラスのストリングを返します。
Returns the string representation of the specified class.- Default Value:
- [class Point]
Returns:
Type Description string このポイントの座標に他のポイントの座標を加算して、新しいポイントを作成します。
Adds the coordinates of another point
to the coordinates of this point to create a new point.Name Type Description v
Point Returns:
Type Description Point この Point オブジェクトのコピーを作成します。
Creates a copy of this Point object.Returns:
Type Description Point すべてのポイントデータを、ソース Point オブジェクトから、
呼び出し元の Point オブジェクトにコピーします。
Copies all of the point data from
the source Point object into the calling Point object.Name Type Description source_point
Point Returns:
void2 つのポイントが等しいかどうかを判別します。
Determines whether two points are equal.Name Type Description to_compare
Point Returns:
Type Description boolean (0,0) と現在のポイント間の線のセグメントを設定された長さに拡大 / 縮小します。
Scales the line segment between (0,0) and the current point to a set length.Name Type Description thickness
number Returns:
Type Description void Point オブジェクトを指定された量だけオフセットします。
Offsets the Point object by the specified amount.Name Type Description dx
number dy
number Returns:
Type Description Point Point のメンバーを指定の値に設定します。
Sets the members of Point to the specified valuesName Type Description xa
number ya
number Returns:
Type Description void このポイントの座標から他のポイントの座標を減算して、新しいポイントを作成します。
Subtracts the coordinates of another point
from the coordinates of this point to create a new point.Name Type Description v
Point Returns:
Type Description Point 指定されたオブジェクトのストリングを返します。
Returns the string representation of the specified object.Returns:
Type Description string