Support Board
Date/Time: Fri, 09 May 2025 18:00:40 +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 |