Thread: Look up table
View Single Post
  #2   Spotlight this post!  
Unread 08-02-2006, 21:25
DanDon's Avatar
DanDon DanDon is offline
ohhh MY god
AKA: Dan Hoizner
FRC #0375 (The Robotic Plague)
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2004
Location: Staten Island, NY
Posts: 1,432
DanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond repute
Send a message via ICQ to DanDon Send a message via AIM to DanDon Send a message via MSN to DanDon
Re: Look up table

Quote:
Originally Posted by revolution1737
I am programming an omnidrive system and I decided to make look up tables instead of sin and square root functions. Can somebody point me in the right direction as I have never done something like this?
Hi, well, basically, you would have something like:

Code:
rom const float sin[]={(here, list values of sin, from 1-90, with values separated by commas)};
and then, you would get the sin of the angle, lets say theta==20, by calling:

Code:
sin[20];
Hope this helps,
__________________