12 ms·
I guess: -2 % 6 = -2, but -2 %% 6 = 4.
by paradoja 13y ago
I guess: -2 % 6 = -2, but -2 %% 6 = 4.
- btmills 13y agoYep. I think the name for it is true or Euclidean modulo. Here's the pull request that introduced it and two other new operators: https://github.com/jashkenas/coffee-script/pull/2887 https://github.com/jashkenas/coffee-script/pull/2887