-
creating even numbers
is there a better way to restrict values to even numbers than this:
Math.round((value / 2) + 0.49) * 2;
i’m dividing a value by 2 adding a fraction, rounding that and then multiplying the result by 2… it just seems like there should be an easier way…
Kevin Camp
Designer – KCPQ, KMYQ & KRCW