Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to clamp a value by modulus

let d=max-min;
let c=((value-min)%d)+min;
 
PREVIOUS NEXT
Tagged: #clamp #modulus
ADD COMMENT
Topic
Name
6+2 =