[NOT A BUG] No Division?

Post any Bug Reports here
Locked
Juryiel
Posts: 103
Joined: Fri Jan 04, 2008 1:18 pm

[NOT A BUG] No Division?

Post by Juryiel » Sun Jan 13, 2008 3:23 am

:shock:

Division doesn't seem to be in, took me a while to figure out why I kept getting 0 values when I shouldn't have been :) Yes, I realize I can just multiply instead, but this is a peculiar thing to be missing :P

EDIT: Apparently it works with decimals. While 1/2 gives me 0, 1.0/2.0 gives me .5! yay!

User avatar
QuestOfDreams
Site Admin
Posts: 1520
Joined: Sun Jul 03, 2005 11:12 pm
Location: Austria
Contact:

Post by QuestOfDreams » Sun Jan 13, 2008 1:45 pm

1/2 is an integer division, the integer part of 0.5 is 0.

Juryiel
Posts: 103
Joined: Fri Jan 04, 2008 1:18 pm

Post by Juryiel » Sun Jan 13, 2008 8:06 pm

I'm confused (I get what you're saying of course, but not sure why only integer answers are possible?) Is it integer/integer must equal integer? I've never run into this before. Thanks for the heads up tho :D

User avatar
darksmaster923
Posts: 1857
Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA
Contact:

Re: [NOT A BUG] No Division?

Post by darksmaster923 » Sun Feb 10, 2008 6:40 pm

1/2 doesnt allow decimals
Herp derp.

Locked