getPointBetween function

List<double> getPointBetween(
  1. double x0,
  2. double y0,
  3. double x1,
  4. double y1, {
  5. double d = 0.5,
})

Get a point between two points.

Implementation

List<double> getPointBetween(
  double x0,
  double y0,
  double x1,
  double y1, {
  double d = 0.5,
}) =>
    [x0 + (x1 - x0) * d, y0 + (y1 - y0) * d];