Your question is Midpoint Between Two Endpoints. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Hexagon Ab geometry tools such as HxGN visualization may represent points in 2D, 3D, or higher-dimensional coordinate space. Given two endpoints of a line segment, return the point exactly halfway between them.
Implement midpoint(point_a, point_b) using coordinate-wise averaging. The input points are lists of numeric values with the same positive dimension. For every coordinate i, the result must satisfy result[i] = (point_a[i] + point_b[i]) / 2.
point_a and point_b containing integers or floating-point values.1e-9.def midpoint(point_a, point_b):