Mail Archives: djgpp/1997/07/19/22:10:11
I was trying to do the folowing (1) and I got an the folowing (2), do you know why?
(1)
float a=0;
float b=0;
float c=0;
a=375;
b=150;
c=a/b;
(2)
I got: c=2
I was using that for virtual screen scrooling but I need a FLOAT c and not the integer part of it.
This return is 'cause '/' returns only an integer. (I think so).
But how can I got an float value?
Guilherme
---------------------------------------------------------------
<underline>Guilherme Silveira - Sao Paulo - Brasil
</underline><italic> 18/09/1981 - Until Today...
</italic>carlos AT usway DOT com - thedarkage AT mail DOT geocities DOT com
What about taking a look on my page:
http://www.geocities.com/SiliconValley/Way/5441/
DJGPP - Visual Basic - C/C++ - Xcom - Warcraft II
THE DARK AGE
- Raw text -