SC2Mapster.com Wiki

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/
  • minimap.jpg

You must login to post a comment. Don't have an account? Register to get one!

Facts

Date created
Mar 13, 2010
Last updated
Mar 13, 2010

Author