Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to get the min value of two variables in math

(x * sgn(y - x) + y * sgn(x - y) + x + y) / 2 
//This will return the minimum value withof if sentences (sgn = signum)
//Althouh 99% of the time some function min() is avalibale
 
PREVIOUS NEXT
Tagged: #min #variables #math
ADD COMMENT
Topic
Name
8+5 =