View Single Post
  #1   Spotlight this post!  
Unread 04-02-2007, 14:21
Tz0m Tz0m is offline
Registered User
FRC #0333
Team Role: Programmer
 
Join Date: Feb 2006
Rookie Year: 2006
Location: New York
Posts: 17
Tz0m is an unknown quantity at this point
Storing functions to variables

I am trying to set a variable, type double, to a function that calculates distance. This is the code I have.
Quote:
dist = 80.0/tan(tilt_angR);
If I use a printf statement to calculate and display "dist," the value caclulates and prints properly. However, I need to set this value to a variable. Any help is appreciated.