How to call round?

PowerMacG5

Diamond Member
Apr 14, 2002
7,701
0
0
No, floor is not it. Floor is similar to the [ ] used in mathematics. Basically y=[x] means the smallest ingteger of x. In simpler terms, it truncates all decimals. Floor will take any real number greater than or equal to x and less than x+1 and make it x. So, for the previous equation, I will restrict the domain to 1 <= x < 2, so for all values of x, y is 1. Hope this helps.
 

lukatmyshu

Senior member
Aug 22, 2001
483
1
0
Originally posted by: KraziKid
No, floor is not it. Floor is similar to the [ ] used in mathematics. Basically y=[x] means the smallest ingteger of x. In simpler terms, it truncates all decimals. Floor will take any real number greater than or equal to x and less than x+1 and make it x. So, for the previous equation, I will restrict the domain to 1 <= x <= 2, and the range range to 1 <= y < 2, so for all values of x, y is 1. Hope this helps.

yeah I realized that, but with a little bit of algebraically trickery floor can become round (by adding 0.5) ....I just wanted to know what member of the truncating family was implemented in C.