LlAtan2/Compass QA

From Second Life Wiki
< LlAtan2
Revision as of 12:56, 22 March 2022 by Draconis Neurocam (talk | contribs) (Updating the syntax highlighting for this page.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
default
{
	state_entry()
	{
		vector p = llGetPos();
		integer a = 0;
		integer b = 72;
		float c = -TWO_PI / b;
		float d = 360.0 / b;
		while(a <= b)
		{
			vector target = (<0,1,0> * llEuler2Rot(<0, 0, c * a>));
			llOwnerSay(llDumpList2String([((integer)(d * a))] + compass(p + target), " "));
			a++;
		}
	}
}