Page 1 of 1

Some questions

PostPosted: Wed Nov 28, 2007 4:30 pm
by asmodeus
What does these things do? :
"(int)"
"(double)"
multiplication with "2.0f"
the function "floor(...)"
"unsigned char + [any variable]"
"(float)"
and "float [any variable]"

Re: Some questions

PostPosted: Thu Nov 29, 2007 8:32 pm
by Troodon
Can you be little more specific?

Int removes the decimals. For example 4,222 -> 4
Double is a number with decimals. For example: 3,141592654

Re: Some questions

PostPosted: Fri Nov 30, 2007 11:14 am
by Bee-Ant
Asmo...your new avatar looks Sammael in Sillent Hill :roll:

Re: Some questions

PostPosted: Fri Nov 30, 2007 1:42 pm
by asmodeus
tekdino wrote:Can you be little more specific?

Int removes the decimals. For example 4,222 -> 4
Double is a number with decimals. For example: 3,141592654

When double is a number with decimals and I've got the number 1.246, I don't need to write (double)1.246. Is that true?

Re: Some questions

PostPosted: Fri Nov 30, 2007 1:43 pm
by asmodeus
Bee-Ant wrote:Asmo...your new avatar looks Sammael in Sillent Hill :roll:

I've got the avatar from the internet and edited it a little bit.

Re: Some questions

PostPosted: Fri Nov 30, 2007 1:56 pm
by Troodon
asmodeus wrote:
tekdino wrote:Can you be little more specific?

Int removes the decimals. For example 4,222 -> 4
Double is a number with decimals. For example: 3,141592654

When double is a number with decimals and I've got the number 1.246, I don't need to write (double)1.246. Is that true?


Yeah, but if you want to convert to double, you must use it.