sevenalive Posted September 20, 2005 Posted September 20, 2005 (edited) [deleted] Edited February 1 by sevenalive
aussiecanuck46 Posted September 21, 2005 Posted September 21, 2005 I'd suggest using the round() method. It rounds a double value to an integer. But if you first multiply that double value by 10 and then round it you could then divide the rounded value by 10 into a double value.
matthewk Posted September 30, 2005 Posted September 30, 2005 You could take your value float/double num:num = (int)num + (int)((num - (int)num)*10)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now