nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge: Contract refactoring
[nit.git]
/
tests
/
shootout_mandelbrot.nit
diff --git
a/tests/shootout_mandelbrot.nit
b/tests/shootout_mandelbrot.nit
index
f8482b2
..
e0923ae
100644
(file)
--- a/
tests/shootout_mandelbrot.nit
+++ b/
tests/shootout_mandelbrot.nit
@@
-54,20
+54,20
@@
for y in [0..h[ do
end
if zr*zr+zi*zi > limit*limit then
end
if zr*zr+zi*zi > limit*limit then
- byte_acc = (byte_acc.lshift(1))
+ byte_acc = byte_acc << 1
else
else
- byte_acc = (byte_acc.lshift(1)) + 1
+ byte_acc = (byte_acc << 1) + 1
end
bit_num = bit_num + 1
if bit_num == 8 then
end
bit_num = bit_num + 1
if bit_num == 8 then
- printn(byte_acc.ascii)
+ stdout.write_byte(byte_acc)
byte_acc = 0
bit_num = 0
else if x == w - 1 then
byte_acc = 0
bit_num = 0
else if x == w - 1 then
- byte_acc = byte_acc.lshift(8-w%8)
- printn(byte_acc.ascii)
+ byte_acc = byte_acc << (8-w%8)
+ stdout.write_byte(byte_acc)
byte_acc = 0
bit_num = 0
end
byte_acc = 0
bit_num = 0
end