View Full Version : What's da difference between a float and a double
rohan_pwln
22nd April 2005, 13:00
They seem the same to me. Is there anyway I can round floats to integers. And where can I get layer FX tutorials or posts. That's all
[thanX]
dlinkwit27
22nd April 2005, 13:21
floats have a higher number range than doubles.
gaekwad2
22nd April 2005, 13:52
Double is short for double precision integer.
A float has a mantissa and an exponent.
eg. (a decimal float, computers use binary ones of course)
1.0533556 * 10^5
PulseDriver
22nd April 2005, 14:08
The point of having different types of integer variables, is to use as little memory as possible. A float will use the memory space of a float, even if you keep values there eg 1-9.
Some languages have types from 1-32bit storage... meaning there are a lot more types than anyone cares for.. I usually use Integer for whole numbers and float for floating point numbers.. the whole idea about this is memory usage all the way.
krckoorascic
22nd April 2005, 16:51
Originally posted by rohan_pwln Is there anyway I can round floats to integers...[/B]
i think there is
System.FloatToInteger(float value)
but not sure, i don't have std.mi right now (not at home)...
Michgelsen
15th August 2005, 20:52
Not directly, but you could use FloatToString and then StringToInteger or:
float f = whatever,004;
int i = f;
corwwin
19th August 2005, 22:41
Here is a double
corwwin
19th August 2005, 22:53
And this is a floating
Michgelsen
19th August 2005, 23:01
Here is a floater
corwwin
19th August 2005, 23:15
The same as mine, just a question of time after the "meal" (if you dare to call meal the fact of swallowing a Mc Do chit )
vBulletin® v3.8.6, Copyright ©2000-2013, Jelsoft Enterprises Ltd.