Point2d
Constructor
Section titled “Constructor”Constructor
Section titled “Constructor”new Point2d(
x?,y?):Point2d
Parameters
Section titled “Parameters”| Parameter | Type | Default value |
|---|---|---|
|
|
|
|
|
|
|
Returns
Section titled “Returns”Point2d
Properties
Section titled “Properties”
readonlyx:number
readonlyy:number
EqualTol
Section titled “EqualTol”
readonlystaticEqualTol:0.001=1.0e-3
Methods
Section titled “Methods”add(
vector):Point2d
The + operator is a fast way to add to the current x, y and z values of a vector. https://ruby.sketchup.com/Geom/Point2d.html#%2B-instance_method
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
|
|
[ |
‐ |
Returns
Section titled “Returns”Point2d
equalTo()
Section titled “equalTo()”equalTo(
point):boolean
The == method is used to determine if two vectors are equal to within tolerance.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
|
|
|
‐ |
Returns
Section titled “Returns”boolean
subtract()
Section titled “subtract()”subtract(
vector):Point2d
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
[ |
Returns
Section titled “Returns”Point2d
toArray()
Section titled “toArray()”toArray(): [
number,number]
The to_a method is used to convert the point to an array of 2 numbers. https://ruby.sketchup.com/Geom/Point2d.html#to_a-instance_method
Returns
Section titled “Returns”[number, number]
SDK 2.35.0
toString()
Section titled “toString()”toString():
string
Returns
Section titled “Returns”string
fromPoint2Like()
Section titled “fromPoint2Like()”
staticfromPoint2Like(array):Point2d
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
[ |
Returns
Section titled “Returns”Point2d