better comments

This commit is contained in:
Andrew Gundersen 2021-03-05 10:41:43 -06:00
commit 13cf7d4170
3 changed files with 4 additions and 2 deletions

View file

View file

@ -15,12 +15,12 @@ export function calcSideProximity (inputItemX: number, winW: number) {
export function calcPosition (inputItemPosition: number, percent: number,
short: number, win: number) {
// Is it close to the right/left side?
// Is it close to a side? If so, stay fixed.
if (percent > 0.75) {
inputItemPosition = win - short
}
// Is it not close to a side?
// Else move relativly.
if (percent < 0.75 && percent > 0.25) {
inputItemPosition = win * percent
}