Tricking the system or secret rounding?
in
Programming Questions
•
1 year ago
Well this might be a very simple question or complex, but I have no clue since the "size" reference doenst mention it but..
I was playing around with the "size () " in the void setup()
----------------------------------------
so I put:
size (400 , 400);
and that was fine
----------------------------------------
BUT then I put
size (400.5 , 400);
and that wasn't fine because that's a float, and only ints allowed apparently..
----------------------------------------
so then I put
size (400/3 , 400);
this was fine, but why if this is 133.33333333 etc
I thought that wasn't allowed
-----------------------------------------
so i put
size (133.33 , 400);
not allowed...
-----------------------------------------
MY QUESTION:
Am I tricking the program? or does it magically round it to convert it to an int?
if so, why doesn't it convert the 133.33 into an int?
OR
are fractions allowed?
Best Regards, El_Emperador
1