polxy() method question
DiverBob
Posts: 1,113
in Propeller 2
Trying out the polxy Spin2 method is giving me results that I don't understand.
Per the Spin2 document:
POLXY(length, angle32bit) : x, y Convert (length,angle32bit) to (x,y)
Several examples show it used in repeat loops to display sin waves in debug scope windows using code like this (example):
repeat x, y := polxy($7FFF, z += $01000000)
I get an x and y when I run something like this but the x, y results don't make any sense to me. I believe its because of the angle32bit parameter. I did some searching but didn't find it defined anywhere. I assumed this method would allow me enter something like a 45 degree angle with a length of 14.14 and get an x and y value of 10.
Comments
angle32bit means: one turn (0..360°, 0..2Pi) is resolved to the full range of a 32bit integer (0..4294967296).
Andy