Create a new HSPoint object
A coordinate for this point on the x-axis
A coordinate for this point on the y-axis
A coordinate for the x-axis position of this point
A coordinate for the y-axis position of this point
Returns the angle between the positive x axis and this point, treated as a vector
A number containing the angle in radians
Checks if this point is equal to another point
An HSPoint to compare against
true if both points have the same x and y coordinates, otherwise false
Truncates the coordinates of this point towards negative infinity
A new HSPoint with the x and y coordinates floored to the nearest integer
Checks if this point lies inside a given rect
An HSRect to check against
true if this point lies within the bounds of rect, otherwise false
Normalizes this point, treated as a vector, to a length of 1
A new HSPoint with the same direction as this point but a length of 1, or new HSPoint(0, 0) if this point has zero length
Scales this point, treated as a vector
A new HSPoint scaled by the given factor, or an unchanged copy of this point if factor is not a number, HSSize or HSPoint
This is a JavaScript object used to represent coordinates, or "points", as used in various places throughout Hammerspoon's API, particularly where dealing with positions on a screen. Behind the scenes it is a wrapper for the CGPoint type in Swift/ObjectiveC.