pub const fn midpoint_2d(left: Point2, right: Point2) -> Point2Expand description
Returns the midpoint between two 2D points.
ยงExamples
use use_geometry::{Point2, midpoint_2d};
let left = Point2::new(-2.0, 1.0);
let right = Point2::new(4.0, 5.0);
assert_eq!(midpoint_2d(left, right), Point2::new(1.0, 3.0));