Reference for Wiring version 1.0 Build 0100+ If you have a previous version, use the reference included with your software. If see any errors or have any comments, let us know.
| Name | float() |
||
|---|---|---|---|
| Examples | float f = float(true); // sets f to 1.0 float g = float(100); // sets g to 100.0 // equivalent to the cast operator float f = (float) true; // sets f to 1.0 float g = (float) 100; // sets g to 100.0 |
||
| Description | Converts a primitive datatype to its floating point representation. This equivalent to the cast operator (float). | ||
| Syntax | float(value) (float) value |
||
| Parameters |
|
||
| Returns | float | ||
| Usage | Application | ||
| Related | float int() long() char() byte() |

