P
Phil Cooper-king
I'm having an issue with a float being converted to an int,
The maths is part of a vector rotation of a little video game, which x,y
coords are rotated at a given angle.
For what ever reason the first instance gives an error, and every
instance there after works as it should
This cant be right?
ruby 1.8.7
[irb]
# This works the way I would think=> 1
# This doesn't=> 1.0
# this is where its werid=> 0
[/irb]
any further 1.0.to_i works
The maths is part of a vector rotation of a little video game, which x,y
coords are rotated at a given angle.
For what ever reason the first instance gives an error, and every
instance there after works as it should
This cant be right?
ruby 1.8.7
[irb]
# This works the way I would think=> 1
# This doesn't=> 1.0
# this is where its werid=> 0
[/irb]
any further 1.0.to_i works