CinnamonMetal Posted October 27, 2017 Share Posted October 27, 2017 How can I shrink a large float value which represents a color to a float with a minimum of three decimal places although it still remains the same color in python ? Quote Link to comment Share on other sites More sharing options...
fencer Posted October 27, 2017 Share Posted October 27, 2017 google > cut float decimal float original = 4.48; int tmp = original * 10; // 44.8 truncated to 44 float truncated = tmp / 10.0; // 4.4 1 Quote Link to comment Share on other sites More sharing options...
CinnamonMetal Posted October 27, 2017 Author Share Posted October 27, 2017 (edited) When truncating a float which represents color how can I verify whether the two values are equally the same color ? Edited October 28, 2017 by CinnamonMetal Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.