Support Board
Date/Time: Fri, 10 Jan 2025 19:54:55 +0000
Post From: Integer portion of a float
[2016-09-25 21:22:24] |
User147461 - Posts: 33 |
Found both of these to work for what I need: double x = 31415.9265, fracportion, intportion; fracportion = modf(x, &intportion); OR int intportion = 31415.9265; both returned the integer portion: intportion = 31415 |