Class Point
A point on a document.
Analogous to TSPoint
.
Functions
Point.new (row, column) | Create a new point. |
Point.pack (row, column) | Alias for new. |
Methods
Point:unpack () | Unpack the point. |
Point:row () | Get the row of the point. |
Point:column () | Get the column of the point. |
Metamethods
Point:__eq (other) | Check equality of two points by value. |
Point:__lt (other) | Check if a point occurs before another point. |
Point:__le (other) | Check if a point occurs before or is the same as another point. |
Functions
- Point.new (row, column)
-
Create a new point.
Parameters:
- row integer
- column integer
Returns:
- Point.pack (row, column)
-
Alias for new.
Parameters:
- row integer
- column integer
Returns:
Methods
- Point:unpack ()
-
Unpack the point.
Inverse of pack.
Returns:
- integer row
- integer column
- Point:row ()
-
Get the row of the point.
Returns:
-
integer
- Point:column ()
-
Get the column of the point.
Returns:
-
integer
Metamethods
- Point:__eq (other)
-
Check equality of two points by value.
Parameters:
- other Point
Returns:
-
boolean
- Point:__lt (other)
-
Check if a point occurs before another point.
Parameters:
- other Point
Returns:
-
boolean
- Point:__le (other)
-
Check if a point occurs before or is the same as another point.
Parameters:
- other Point
Returns:
-
boolean