Point
point Point(fixed x, fixed y);
Create a new point
Parameters
- fixed x
X coordinate
- fixed y
Y coordinate
Return value
point - A new point of coordinates (x, y)
Examples
- Example #1: Sample Usage
point p; p = Point(0, 0); p = Point(100, 50);
- Example #2: PointXY
fixed PointX(point p) { point ref = Point(0, 0); return cos(DegToRad(AngleBetweenPoints(ref, p))) * DistanceBetweenPoints(ref, p); } fixed PointY(point p) { point ref = Point(0, 0); return sin(DegToRad(AngleBetweenPoints(ref, p))) * DistanceBetweenPoints(ref, p); } // Note: It requires cos and sin. // http://www.sc2mapster.com/assets/basic-mathematic-functions/