Yin and yang: Difference between revisions

Content added Content deleted
m (→‎{{header|Wren}}: Changed to Wren S/H)
 
Line 5,611: Line 5,611:
===Text===
===Text===
{{trans|AWK}}
{{trans|AWK}}
<syntaxhighlight lang="ecmascript">var inCircle = Fn.new { |centerX, centerY, radius, x, y|
<syntaxhighlight lang="wren">var inCircle = Fn.new { |centerX, centerY, radius, x, y|
return (x-centerX)*(x-centerX)+(y-centerY)*(y-centerY) <= radius*radius
return (x-centerX)*(x-centerX)+(y-centerY)*(y-centerY) <= radius*radius
}
}
Line 5,710: Line 5,710:
{{libheader|DOME}}
{{libheader|DOME}}
With a few minor changes, we can use the same code to draw these symbols in DOME.
With a few minor changes, we can use the same code to draw these symbols in DOME.
<syntaxhighlight lang="ecmascript">import "dome" for Window
<syntaxhighlight lang="wren">import "dome" for Window
import "graphics" for Canvas, Color
import "graphics" for Canvas, Color