This i what I am trying to achieve:
If a double has more than 3 decimal places, I want to truncate any decimal places beyond the third. (do not round.)
You can use:
double example = 12.34567; double output = ( (double) ( (int) (example * 1000.0) ) ) / 1000.0 ;