toDiscreteFieldFunction

Composes a function that casts, point-wise, float values from this function's field result to integer values across its extent. Values that are within the representable range of a 32-bit signed integer are rounded to the nearest integer by discarding the fractional part then cast. Values that are not within the representable range of a 32-bit signed integer are clamped to be within the representable range then rounded to the nearest integer by discarding the fractional part then cast. The function result has no data where this function's field result has no data.

The function result extent equals that of this function's field result.

Use ContinuousFieldFunction.floor, ContinuousFieldFunction.round, and ContinuousFieldFunction.ceil to control rounding before casting.

Return

A function that casts float values from this function's field result to integer values.

Since

300.0.0