FloatPointer

elements.FloatPointer (Typedef)

Function type for accessing and modifying floating-point values by reference.

This type definition enables functional-style float value manipulation, commonly used in the elements UI system for two-way data binding between UI components and numeric data models.

Usage example:

var myFloat = 3.14;
var pointer:FloatPointer = (val) -> {
    if (val != null) myFloat = val;
    return myFloat;
};

// Read current value
var current = pointer();

// Set new value
pointer(2.71);
See: NumberFieldView, SliderView, FieldView