Check out example codes for "check if float has decimals c++". It will help you in understanding the concepts better.

Code Example 1

if (some_float == (int)some_float) {
	// decimal part == 0.0 i.e. no fractional part
}

Learn ReactJs, React Native from akashmittal.com