Thread
:
Storing functions to variables
View Single Post
#
2
04-02-2007, 14:45
Bongle
Registered User
FRC #2702 (REBotics)
Team Role: Mentor
Join Date: Feb 2004
Rookie Year: 2002
Location: Waterloo
Posts: 1,069
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.
Bongle
View Public Profile
Find all posts by Bongle
Find CD-Media Photos by Bongle
Find CD-Media Papers by Bongle