Created
April 7, 2017 14:56
-
-
Save mvbattan/b5658f1acd3a625d5b088141d8c4800d to your computer and use it in GitHub Desktop.
Scaler.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Point } from './pointUtils'; | |
| export const startingPoint = Point(-20 , 8); | |
| const endingPoint = Point(242, 100); | |
| export function vectorTransform(point, maxValue, scaleCount) { | |
| return Point( | |
| point.x * (endingPoint.x / scaleCount) + endingPoint.x / scaleCount, | |
| point.y * (endingPoint.y / maxValue) | |
| ); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment