MCPcopy Create free account
hub / github.com/TodePond/ScreenPond / getScaledPosition

Function getScaledPosition

source/position.js:98–102  ·  view source on GitHub ↗
(position, corners)

Source from the content-addressed store, hash-verified

96};
97
98export const getScaledPosition = (position, corners) => {
99 const zeroedCorners = getZeroedCorners(corners);
100 const scaledPosition = getMappedPosition(position, zeroedCorners);
101 return scaledPosition;
102};
103
104export const getZoomedPosition = (position, zoom, origin) => {
105 const [x, y] = position;

Callers 1

pickInScreenFunction · 0.90

Calls 2

getZeroedCornersFunction · 0.90
getMappedPositionFunction · 0.85

Tested by

no test coverage detected