Offset alongOffset(Offset other)

Returns the offset that is this fraction in the direction of the given offset.

Source

Offset alongOffset(Offset other) {
  return new Offset(dx * other.dx, dy * other.dy);
}