PanTilt.fromInt constructor

PanTilt.fromInt({
  1. required int x,
  2. required int y,
})

helper to allow an int for 1 - 10000 in place of the double

Implementation

factory PanTilt.fromInt({required int x, required int y}) =>
    PanTilt(x: x == 0 ? 0 : (x / 10000.0), y: y == 0 ? 0 : (y / 10000.0));