ScratchData LogoScratchData
Back to Splodgey's profile

Floor of 51 = 50?

SPSplodgey•Created April 2, 2014
Floor of 51 = 50?
1
1
68 views
View on Scratch

Instructions

Type a number... test2 = number + 0.01 test3 = (test2 - floor(test2)) * 100 test = floor(test3) If you type in 51.5, test will end up being 50, when test3 is 51... Apparently 51 rounded down is 50? Hardcoding in Floor(51) returns 51... This seems to work for any number above 32, and below 64

Description

I have absolutely no clue as to why this happens.. The same thing appears to happen in Pascal, and javascript

Project Details

Project ID20197507
CreatedApril 2, 2014
Last ModifiedJuly 3, 2014
SharedApril 2, 2014
Visibilityvisible
CommentsAllowed