Skip to content

Utils.Function.createDomainRestrictedUniFunction

Christian d'Heureuse edited this page Sep 25, 2026 · 1 revision

commons-math-interpolation / Utils / createDomainRestrictedUniFunction

Function: createDomainRestrictedUniFunction()

function createDomainRestrictedUniFunction(
   f, 
   xMin, 
   xMax
): UniFunction;

Defined in: Utils.ts:235

Wraps a function in another function that returns NaN when the argument is outside the domain xMin ... xMax.

Parameters

f

UniFunction

The function to be wrapped.

xMin

number

The lower bound of the domain (inclusive).

xMax

number

The upper bound of the domain (inclusive).

Returns

UniFunction

A function that returns f(x) for xMin <= x <= xMax and otherwise NaN, including when x is NaN.

Clone this wiki locally