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
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
}