PanTilt.fromInt constructor

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

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

Implementation

factory PanTilt.fromInt({int x = 1000, int y = 1000}) => PanTilt(
    rawX: (x == 0 ? 0 : (x / 10000)).toString(),
    rawY: (y == 0 ? 0 : (y / 10000)).toString());