This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2007-05-01 01:33:09

kevin_karplus
Scratcher
Registered: 2007-04-27
Posts: 1000+

Mod bug in java implementation

http://scratch.mit.edu/projects/kevin_karplus/2162
works correctly in the squeak implementation, but not in the java implementation.

The problem seems to be that the java implementation does not correctly compute
(-1 mod 32) as 31, the way the squeak implementation does.

The mod function should always be  x mod y = x - floor(x/y)*y  even when x or y is negative or non-integer.

Offline

 

#2 2007-05-07 06:46:26

andresmh
Scratch Team at MIT
Registered: 2007-03-05
Posts: 1000+

Re: Mod bug in java implementation

Great bug report! We will look into it.


Andres Monroy-Hernandez | Scratch Team at the MIT Media Lab
on identi.ca and  twitter

Offline

 

#3 2007-08-08 05:52:12

gne
Scratcher
Registered: 2007-08-07
Posts: 22

Re: Mod bug in java implementation

what is "mod" on the game page mean e.g 10 downloads and 5 mods?

Offline

 

Board footer