OffsetBase constructor

const OffsetBase(double dx double dy)

Abstract const constructor. This constructor enables subclasses to provide const constructors so that they can be used in const expressions.

The first argument sets the horizontal component, and the second the vertical component.

Implementation

const OffsetBase(double dx, double dy)
    : _dx = dx ?? 0.0,
      _dy = dy ?? 0.0,
      assert(dx != null),
      assert(dy != null);