Search⌘ K
AI Features

Midpoint and Linear Interpolation

Explore how to calculate midpoints and perform linear interpolation using C++20's std::midpoint and std::lerp functions. Understand their applications with integers, floating points, and pointers, and grasp the difference between interpolation and extrapolation for various values of t.

We'll cover the following...
  • std::midpoint(a, b): calculates the midpoint (a+(bāˆ’a)/2)(a + (b - a) / 2)
...