Jump to content

Centre and radius of a circle passing through 3 points in a plane: Difference between revisions

→‎{{header|Uiua}}: Added tacit version
(Added Uiua solution)
(→‎{{header|Uiua}}: Added tacit version)
 
Line 816:
[14.70862397833418 14.708623978334176 14.708623978334177]
</pre>
=== Tacit version ===
Terse too.
<syntaxhighlight lang="uiua">
[[22.83 2.07] [14.39 30.24] [33.65 17.31]]
⊃(≡(/+≡(×.))|↻¯1-↻¯1.).. # Squares and diffs
÷⊃(/+ × ≡⇌◌|⇌÷2/+×) # Find centre
:⟜(√/+×.-⊙⊢) # Derive radius
</syntaxhighlight>
 
=={{header|Wren}}==
This follows the lines of the C++ code [https://www.geeksforgeeks.org/equation-of-circle-when-three-points-on-the-circle-are-given/ here].
159

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.