Michael Doub asked > What are the implications of getting a fractional part of a point? Does > livecode just ignore the fraction or should the results be truncated or > rounded?
When setting “the points,” LC insists on integers, although it is more forgiving in other cases (e.g., you can “set the loc” using non-integers. I wrote the function without rounding because I may want to call it from a script that performs multiple transformations and then rounds the final results. > On 3/10/15 10:27 PM, David Epstein wrote: >> function yAD x,y,d,a,@xAD >> -- calculate point x1,y1 that is distance d and angle a from point x,y >> -- return y1, load x1 into param 5 >> -- a is in degrees, positive is east of north >> put (90-a)*2*pi/360 into a >> put x + d*cos(a) into xAD >> return y + d*sin(a) >> end yAD > David Epstein _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode