Circles of given radius through two points: Difference between revisions

m
→‎{{header|11l}}: Named tuple as a base type
(Added Easylang)
m (→‎{{header|11l}}: Named tuple as a base type)
 
(3 intermediate revisions by 2 users not shown)
Line 34:
{{trans|Python}}
 
<syntaxhighlight lang="11l">T Circle((Float x, Float y, Float r))
Float x, y, r
 
F String()
R ‘Circle(x=#.6, y=#.6, r=#.6)’.format(.x, .y, .r)
 
F (x, y, r)
.x = x
.y = y
.r = r
 
T Error
Line 50 ⟶ 43:
.msg = msg
 
F circles_from_p1p2r(p1, p2, r) X(Error)
‘Following explanation at http://mathforum.org/library/drmath/view/53027.html’
I r == 0.0
Line 81 ⟶ 74:
V (c1, c2) = circles_from_p1p2r(p1, p2, r)
print(" #.\n #.\n".format(c1, c2))
X.catchhandle Error v
print(" ERROR: #.\n".format(v.msg))</syntaxhighlight>
 
Line 123 ⟶ 116:
ERROR: radius of zero
</pre>
 
=={{header|Action!}}==
{{libheader|Action! Tool Kit}}
Line 4,717 ⟶ 4,711:
{{trans|Go}}
{{libheader|Wren-math}}
<syntaxhighlight lang="ecmascriptwren">import "./math" for Math
 
var Two = "Two circles."
Line 4,812 ⟶ 4,806:
Center: (0.1234, 0.9876)
</pre>
 
=={{header|XPL0}}==
An easy way to solve this:
1,481

edits