The math behind that is: take the average of the two numbers, and then add half their difference (start half-way between, and then go up by half). So: (x+y)/2 + abs(x-y)/2, and then factor out the division by two.($x + $y + abs($x - $y)) / 2
------------ :Wq Not an editor command: Wq
In reply to Re: Finding the max()/min()
by etcshadow
in thread Finding the max()/min()
by dragonchild
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |