#how to get random numbers

1 messages · Page 1 of 1 (latest)

random ferry
#

hi, i use c#
and i tried this :
and it doesn't work

acoustic lintel
#

just add an 'f' after your decimal numbers

dawn sierra
median sky
#

2.5 is a double literal, by multiplying by that you are changing the int into a double. You'll have trouble assigning to an int without explicit conversion too

acoustic lintel
#

yea

2.5 // double
2.5f // float
random ferry
#

i will try this later :)
thanks a lot !!!

acoustic lintel
#

you also need to change your variables to float if you want decimals

#

using int will truncate decimals