CPoint Class Description
The CPoint class holds a pair of numbers teated as a single object, much like a point on the (x,y) plane. This class is useful for simplifying scripts that work with pairs of numbers. In addition to several class methods, many operations between CPoint objects and other objects use math operators that work outside of class methods.
This class has 2 properties that describe the point and may be directly used. For example, if the class object is P, then the x value is accessed by P.x. You can access this and other properties directly or use the accessor methods like Set. Remember that properties use the dot operator and methods use the colon operator.
x |
The x coordinate of the point. |
y |
The y coordinate of the point. |
Construction |
Object = new_point() Object = CPoint:new() |
Destruction |
Object:delete() |
This class provides simple arithmetic and comparision operations between objects. |
This function is normally used to create a new CPoint object as an alternative to the class-based new method.
Global function that creates a new CPoint object. |
Creates a new instance of the CPoint class. |
|
Deletes the instance of the CPoint object. |
Elevates the x and y properties to the next higher integer value. |
|
Truncates the x and y properties to the next lower integer value. |
|
Offsets both class members x and y by adding values to them. |
|
Rounds the x and y properties to the closest integer value. |
|
Sets the values of class members x and y. |
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2024 Mirametrics,
Inc. All Rights Reserved.