Format a floating point number using fixed precision. More...
#include <sifteo/string.h>
Public Member Functions | |
FixedFP (float value, unsigned left, unsigned right, bool leadingZeroes=false) | |
Format 'value' using exactly 'left' digits to the left of the decimal, and 'right' digits to the right. More... | |
Format a floating point number using fixed precision.
This is a type which can be used with String's << operator, to format floating point numbers with a fixed number of digits to the left and to the right of the decimal point.
Note that this operates by converting both the left and right side into integers, and printing them separately.
|
inline |
Format 'value' using exactly 'left' digits to the left of the decimal, and 'right' digits to the right.
If 'leadingZeroes', extra leading characters will be '0', otherwise they will be spaces.
Sifteo SDK v1.1.0 (see all versions)
Last updated Tue Dec 23 2014, by Doxygen