01_user_documentation:07_rgg_xl:02_xl:10_rgg_addition:04_operator_overload:02_function
Functions
Instances of de.grogra.xl.lang.FloatToFloat represent functions which take floats as input and return values of type float. Such instances cant be created by:
- lambda expressions of the XL programming language, e.g.,
FloatToFloat f = float x => float x**2
- some expression containing x
Index
FloatToFloat[float]compute the FloatToFloat function on the float argument (the same result asf.evaluateFloat(x)).
The package de.grogra.math contains many predefined FloatToFloat objects, and is imported by default in RGG files. Thus, it is possible to write:
new Abs()[-5]; // return 5 //or define the object once and use it several times: static Abs ABS = new Abs(); ABS[-5]; ABS[42]; // ...
01_user_documentation/07_rgg_xl/02_xl/10_rgg_addition/04_operator_overload/02_function.txt ยท Last modified: 2026/03/27 17:44 by Tim
