Bots and Simulations > DNA - General

How can you approximate sin-1?

<< < (4/5) > >>

Botsareus:
ok fine, in plain English:

Use the following to get sin-1 instead of approximating it:


--- Code: ---cond
start
33 999 store
*.xpos 1 999 * 2 pow sub 2 root add *.ypos 999 * sub angle
stop
end

--- End code ---

There is ways to fix the above to not use a variable.
You will also have to multiply everything into integer range.

MysticalDumpling:
And.... my equation worked for 3 cycles- it did an ahead shot and everything... then it swang around randomly. *sigh* Such is life.

Bit too late, Bots. I need arccos.  :P Thanks though

Botsareus:
Ok, then simply use.


--- Code: ---cond
start
33 999 store
*.xpos 999 *  add *.ypos 1 999 * 2 pow sub 2 root sub angle
stop
end

--- End code ---

MysticalDumpling:
Ok

Botsareus:
Something like that anyway. I did not review my work other then the vb portion and my original post. Maybe I'll have time later to properly fix it up.  :P

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version