Answers for "check if float has decimals c++"

C++
0

check if float has decimals c++

if (some_float == (int)some_float) {
	// decimal part == 0.0 i.e. no fractional part
}
Posted by: Guest on September-14-2020

Code answers related to "check if float has decimals c++"

Browse Popular Code Answers by Language