Skip to content

Point2d

new Point2d(x?, y?): Point2d

Parameter Type Default value

x

Numeric

0

y

Numeric

0

Point2d

readonly x: number


readonly y: number


readonly static EqualTol: 0.001 = 1.0e-3

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

Parameter Type Description

vector

[number, number] | Point2d

‐

Point2d


equalTo(point): boolean

The == method is used to determine if two vectors are equal to within tolerance.

Parameter Type Description

point

Point2d

‐

boolean


subtract(vector): Point2d

Parameter Type

vector

[number, number] | Point2d

Point2d


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

[number, number]

SDK 2.35.0


toString(): string

string


static fromPoint2Like(array): Point2d

Parameter Type

array

[number, number]

Point2d

readonly to_a: [number, number]