Difference between 100 and 100.0
#1

What is the diffrence between 100 and 100.0 at SetPlayerHealth for example?
Reply
#2

None.
Reply
#3

health is a float, so you should use 100.0 for correct usage.
Reply
#4

In real there is no difference but in programming 100 is called an Integer and 100.00 is called a Float. What ikey and Zeus said are right. There are two types of numbers in the programming world : integer , float.
Reply
#5

There's not difference at all. Whenever you declare it as a Float and you use "100", it's meant to be 100.0
No matter if "100" would be readable as integer.
Reply
#6

I'd rather write it 100.0 makes more sense and is easy to identify even though it makes no difference to the compiler.
Reply
#7

For good practice, just put 100.0. I believe there's a section somewhere in the documentation that handles this case. I'll see if I can find it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)