-
Notifications
You must be signed in to change notification settings - Fork 0
Angle_difference
hpgDesigns edited this page Aug 8, 2021
·
1 revision
Calculates the difference between two angles and returns the result.
| Parameter | Data Type | Description |
|---|---|---|
| ang1 | double | the first angle, in degrees |
| ang2 | double | the second angle, in degrees |
double: Returns the difference between the two angles, between -180 and 180.
// demonstrates getting the difference between the calling instance and the position of an instance of the enemy object
var inst, diff;
inst = instance_nearest(x, y, obj_enemy);
diff = angle_difference(direction, point_direction(x, y, inst.x, inst.y));
NOTOC
Category:Function:Real
This is number 1