FunctionsCommonModuloCommonModulo CallableCommonModulo(value: number, divisor: number): numberReturn value % divisor but properly handling negative values Useful if you have a set of keys and want to move an index within its bounds with proper wrap-around.Parametersvalue: numberdivisor: numberReturns number
Return value % divisor but properly handling negative values
Useful if you have a set of keys and want to move an index within its bounds with proper wrap-around.