View Single Post
  #2   Spotlight this post!  
Unread 04-02-2007, 14:45
Bongle's Avatar
Bongle Bongle is offline
Registered User
FRC #2702 (REBotics)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2002
Location: Waterloo
Posts: 1,069
Bongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond repute
Send a message via MSN to Bongle
Re: Storing functions to variables

If I read this correctly, you're trying to make a function that returns a distance.

Code:
double dist(double tilt_angR)
{
  return 80.0/tan(tilt_angR);
}
That code will do what I think you want to do.