toOffset static method

Offset toOffset(
  1. Vector3 cameraPosition,
  2. Vector3 position, [
  3. Offset offset = const Offset(0, 0)
])

Implementation

static Offset toOffset(Vector3 cameraPosition,Vector3 position,[Offset offset = const Offset(0,0)]){
  double cameraX = cameraPosition.x;
  double cameraY = cameraPosition.y;
  return Offset((position.x*100-(cameraX*100))+offset.dx, (position.y*-100+(cameraY*100))+offset.dy);
}