What\'s the easiest way to truncate a C++ float
variable that has a value of 0.6000002 to a value of 0.6000 and store it back in the variable?
i think the question that should be asked here is: Why do you need it truncated?
If its for comparison between values, perhaps you should consider using the epsilon test. (with an extra tolerance value, in your case, since it seems to be far larger than the generally accepted epsilon).
If you're just wanting to print it out as 0.6000 , use the methods others have suggested.