Optionaloptions: { x?: number; y?: number; [k: string]: unknown }The x coordinate of the point.
The y coordinate of the point.
StaticdefaultApplies a transformation to the point by multiplying the point like a 2D vector to the matrix.
Returns a new instance of this Record type with all values set to their default values.
Returns a new instance of this Record type with the value for the specific key set to its default value.
Calculates the euclidean distance to another point.
The other point to calculate the distance with.
The distance between the two points.
Returns the value associated with the provided key, which may be the default value defined when creating the Record factory function.
If the requested key is not defined by this Record type, then notSetValue will be returned if provided. Note that this scenario would produce an error when using Flow or TypeScript.
OptionalnotSetValue: anyRotates the point at the origin [0, 0].
Scales x and y by the given sx and sy factor. If only sx is set and sy not defined,
it will scale x and y by sx.
Scale value for the x coordinate. If sy is not set, this scale will also
be applied to y.
Optionalsy: numberIf empty, it will scale y with sx as well.
A new Point.
Deeply converts this Record to equivalent native JavaScript Object.
Note: This method may not be overridden. Objects with custom serialization to plain JS may override toJSON() instead.
Shallowly converts this Record to equivalent native JavaScript Object.
Shallowly converts this Record to equivalent JavaScript Object.
Translate all values of the point by a given Point.
A point that describes the translation distance.
A new Point.
A point describes a 2D vector in space consisting of an
xandycoordinate. Provided values are defined in same units used by the page, point units. Point units are only equal to pixels when zoom value is1.It is an https://facebook.github.io/immutable-js/docs/#/Record|Immutable.Record and thus can be updated using
set(key, value), for example:point.set("x", 20).Example
Create and update a point.
Param: args
An object used to initialize the Point. If
xoryis omitted,0will be used instead.Default