Munching squares: Difference between revisions
m
→{{header|Wren}}: Changed to Wren S/H
(→{{header|Evaldraw}}: add image) |
m (→{{header|Wren}}: Changed to Wren S/H) |
||
(3 intermediate revisions by 3 users not shown) | |||
Line 608:
>2%*28*:**-2/\1-:v<:8:-1<_@ v
^\-1*2%2/*:*82::\_$0.0..:^:*<</syntaxhighlight>
=={{header|BQN}}==
Outputs a string that represents a PPM image.
BQN uses the <code>•bit</code> namespace for native bitwise operations, including casting. An input bit width and output bit width have to be given.
<syntaxhighlight lang="bqn">nl←@+10
XORppm ← {
g←⥊(0∾∾˜)¨((↕𝕩)16‿16•bit._xor⊢)˘↕𝕩
s←•Repr 𝕩
h←"P3"∾nl∾s∾" "∾s∾nl∾(•Repr 𝕩-1)∾nl
h∾∾∾⟜nl¨{¯1↓∾∾⟜' '¨•Repr¨𝕩}¨g
}</syntaxhighlight>
Example usage:
<syntaxhighlight lang="bqn">"xor.ppm" •FChars XORppm 256</syntaxhighlight>
=={{header|Burlesque}}==
Line 991 ⟶ 1,005:
=={{header|EasyLang}}==
[https://easylang.dev/show/#cod=VYxLCoAwDET3PcWsFWqL4s7DaK0f0BZSEb29iRTBZDHJG2aSQwdrDCq0jZoi4QL1YfZGfgCC7j/iWTg1rEcfRpHrjd1o62xL6SKVH4hbpJo5b0Z7PD2nCiTHUZFskHeHwBJG2+8QUyutHg== Run it]
<syntaxhighlight lang="easylang">
Line 1,056 ⟶ 1,070:
{{FormulaeEntry|page=https://formulae.org/?script=examples/Munching_squares}}
'''Solution'''
[[File:Fōrmulæ - Munching squares 01.png]]
'''Test case'''
[[File:Fōrmulæ - Munching squares 02.png]]
[[File:Fōrmulæ - Munching squares 03.png]]
=={{header|GLSL}}==
Line 1,904 ⟶ 1,928:
{{trans|D}}
{{libheader|DOME}}
<syntaxhighlight lang="
import "dome" for Window
|