### [SOLVED]Round a number to the nearest multiple..

Posted:

**Sat Nov 05, 2011 2:20 pm**Het all!

Today it's about Maths, and well my brain crash down when it's about Maths.

Here's the problem:

I've a first number whose value is determined by the X position of the mouse. (We call it

I've a second number who is always even. (We'll call

How to round up or down

If someone wanna help me, or teach me!wilfryed 2011-11-05 15:29:15

Today it's about Maths, and well my brain crash down when it's about Maths.

Here's the problem:

I've a first number whose value is determined by the X position of the mouse. (We call it

*a*)I've a second number who is always even. (We'll call

*b*)*a*and*b*are integer.How to round up or down

*a*to the nearest multiple of*b*?If someone wanna help me, or teach me!