[−][src]Function arcs::centre_of_three_points
pub fn centre_of_three_points<S>(
first: Point2D<f64, S>,
second: Point2D<f64, S>,
third: Point2D<f64, S>
) -> Option<Point2D<f64, S>>
Find the centre of an arc which passes through 3 [Point2D
]s.
Note
If the points are collinear then the problem is ambiguous, the radius effectively becomes infinite and our centre could be literally anywhere.
let first = Point::new(0.0, 0.0); let second = Point::new(1.0, 0.0); let third = Point::new(25.0, 0.0); let got = arcs_core::centre_of_three_points(first, second, third); assert!(got.is_none());