Curve that touches three points: Difference between revisions

Content added Content deleted
m (→‎{{header|Raku}}: oops, lost required brackets)
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) = (ref ([.[0]², .[0], 1, .[1]] for @points) )[*;*-1];
my (\a, \b, \c) = (rref ([.[0]², .[0], 1, .[1]] for @points) )[*;*-1];


# Evaluate quadratic equation
# Evaluate quadratic equation