Curve that touches three points: Difference between revisions
Content added Content deleted
SqrtNegInf (talk | contribs) m (→{{header|Raku}}: oops, lost required brackets) |
Thundergnat (talk | contribs) m (→{{header|Raku}}: Arrr....) |
||
Line 670: | Line 670: | ||
# Solve for a quadratic line that passes through those points |
# Solve for a quadratic line that passes through those points |
||
my (\a, \b, \c) = ( |
my (\a, \b, \c) = (rref ([.[0]², .[0], 1, .[1]] for @points) )[*;*-1]; |
||
# Evaluate quadratic equation |
# Evaluate quadratic equation |