Thread
:
Overloaded functions
View Single Post
#
6
31-12-2004, 11:04
Astronouth7303
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Re: Overloaded functions
The only thing I can think of is to use a macro
Code:
#define ABS(num) ( ((num) >= 0) ? (num) : (0 - (num)) )
which will work for any numeric type you give it.
But I still wouldn't use floating point.
Astronouth7303
View Public Profile
Visit Astronouth7303's homepage!
Find all posts by Astronouth7303
Find CD-Media Photos by Astronouth7303
Find CD-Media Papers by Astronouth7303