The mid-point formula is defined as,

\[(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2})\]```
function midpoint(u, v)
[(u[k]+v[k])/2 for k in 1:2]
end
@show midpoint([1; 0], [0; 1])
> midpoint([1; 0], [0; 1]) = (0.5, 0.5)
```

© Daniel Marvin. Last modified: July 19, 2021.