Archaic
04-07-2012, 07:32 AM
I was just wondering: is there a way to add "position tolerance" to an SPS position? I.E. if I call the function:
SPS_GetMyPos;
and it gives me a value of:
1010, 1010
is there a way that I could create a function that returns true if my position is within + or - x units of a target position?
For instance if I have a target point of 1000, 1000 and GetMyPos returns a value of 1010, 1010 like above, how can I create a function that returns true because the point 1010, 1010 is within 10 units of the wanted position?
(More specifically if I'm using something along the lines of:
SPS_GetMyPos;
Location := toStr(SPS_GetMyPos);
if (Location = '(1000, 1000)') then
...
)
I know about regular SPS tolerance, but would that work in this instance perhaps?
SPS_GetMyPos;
and it gives me a value of:
1010, 1010
is there a way that I could create a function that returns true if my position is within + or - x units of a target position?
For instance if I have a target point of 1000, 1000 and GetMyPos returns a value of 1010, 1010 like above, how can I create a function that returns true because the point 1010, 1010 is within 10 units of the wanted position?
(More specifically if I'm using something along the lines of:
SPS_GetMyPos;
Location := toStr(SPS_GetMyPos);
if (Location = '(1000, 1000)') then
...
)
I know about regular SPS tolerance, but would that work in this instance perhaps?