This page is also available in 3 other languages

float()

[Conversion]

Description

Converts a value to the float data type.

Syntax

float(x)

Parameters

x: a value. Allowed data types: any type.

Returns

Data type: float.

Notes and Warnings

See the reference for float for details about the precision and limitations of floating point numbers on Arduino.

See also