v1.1
 
Point2D Class Reference

Two-dimensional point. More...

Public Member Functions

 Point2D (number x, number y)
 Constructor.
 
self Shift (number x, number y)
 Shifts the point.
 
self Rotate (Point2D point, number angle)
 Rotates the point.
 
self Scale (Point2D fixedPoint, number xScale, number yScale)
 Scales the point.
 
self Transform (Matrix2D matrix)
 Transforms according to the matrix.
 
Point2D Clone ()
 Returns a copy of the object.
 
number GetX ()
 Returns the x-coordinate of the point.
 
number GetY ()
 Returns the y-coordinate of the point.
 
boolean operator== (Point2D other)
 Checks for equality.
 
boolean operator~= (Point2D other)
 Checks for inequality.
 

Detailed Description

Two-dimensional point.

Member Function Documentation

◆ Rotate()

self Rotate ( Point2D point,
number angle )

Rotates the point.

Parameters
pointCenter of rotation.
angleThe angle in radians.

◆ Scale()

self Scale ( Point2D fixedPoint,
number xScale,
number yScale )

Scales the point.

Parameters
fixedPointFixed point.
xScaleX scale coefficient.
yScaleY scale coefficient.