View Single Post
  #3   Spotlight this post!  
Unread 16-02-2003, 21:12
Ameya's Avatar
Ameya Ameya is offline
Freelance Goon
FRC #0293 (SPIKE Robotics)
Team Role: Alumni
 
Join Date: May 2001
Rookie Year: 2000
Location: Pennington, NJ
Posts: 67
Ameya is on a distinguished road
Send a message via ICQ to Ameya Send a message via AIM to Ameya
Yeah, it seems kind of odd that MIN returns the maximum of the arguments while MAX returns the minimum, but it makes sense if you think about it in another way:

MIN sets the minimum allowable value of an expression to another value.

MAX sets the maximum allowable value of an expression to another value.

So if you do
a = a + 1 MAX 127
then a will increment, but will never go higher than 127.

Hope that helps you understand.
__________________
Ameya Agaskar
Team 293 alumnus