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

@ -43,3 +43,5 @@ PID 60328 received SIGSEGV for address: 0x7f900fab4000
12 libsystem_pthread.dylib 0x00007fff205f747b thread_start + 15
PID 65740 received SIGSEGV for address: 0x7fbddef00000
0 segfault-handler.node 0x0000000116e6ae60 _ZL16segfault_handleriP9__siginfoPv + 304
PID 65817 received SIGSEGV for address: 0x7fe23f39d000
0 segfault-handler.node 0x0000000110840e60 _ZL16segfault_handleriP9__siginfoPv + 304

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
}