Author Topic: How can you approximate sin-1?  (Read 7288 times)

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: How can you approximate sin-1?
« Reply #15 on: May 02, 2014, 03:09:08 PM »
ok fine, in plain English:

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

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

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

Offline MysticalDumpling

  • Bot Destroyer
  • ***
  • Posts: 205
  • Kurwa chuj!
    • View Profile
Re: How can you approximate sin-1?
« Reply #16 on: May 02, 2014, 03:10:23 PM »
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
To być albo nie być, oto jest ze pytanie

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: How can you approximate sin-1?
« Reply #17 on: May 02, 2014, 03:14:06 PM »
Ok, then simply use.

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

Offline MysticalDumpling

  • Bot Destroyer
  • ***
  • Posts: 205
  • Kurwa chuj!
    • View Profile
Re: How can you approximate sin-1?
« Reply #18 on: May 02, 2014, 03:18:49 PM »
Ok
To być albo nie być, oto jest ze pytanie

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: How can you approximate sin-1?
« Reply #19 on: May 02, 2014, 03:21:48 PM »
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


Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: How can you approximate sin-1?
« Reply #20 on: May 02, 2014, 03:30:23 PM »
On further review, I can see why you may want to approximate it using different methods because I am overflowing at 1024000000 if you try to fix my formula. :P

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: How can you approximate sin-1?
« Reply #21 on: May 02, 2014, 03:34:21 PM »
Dumpling, what are you trying to accomplish anyway?

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: How can you approximate sin-1?
« Reply #22 on: May 02, 2014, 04:18:07 PM »
Nm, actually took the time to read your code.