First up, never use variable names like that. Always use descriptive names unless the meaning is so obvious that a simple name will suffice. Xx and Xxx are definitely not obvious. If you need to use names like 'tempX' and 'finalX' or something like that then do so.

As for the question, you can easily round a value to any number of decimal places, so you should scale (multiply or divide) your value first, then round to the appropriate number of decimal places, then scale back again.