Skip to content

RF Touchstone


RF Touchstone / touchstone / round

Variable: round()

round: {<T>(x, n?): NoLiteralType<T>; <U>(x, n): U; <U>(x, unit): U; (x, unit): Unit; (x, n, unit): Unit; <U>(x, n, unit): U; }

Defined in: node_modules/mathjs/types/index.d.ts:7176

Call Signature

<T>(x, n?): NoLiteralType<T>

Round a value towards the nearest integer. For matrices, the function is evaluated element wise.

Type Parameters

T

T extends MathNumericType | MathCollection<MathNumericType>

Parameters

x

T

Number to be rounded

n?

Number of decimals Default value: 0.

number | BigNumber

Returns

NoLiteralType<T>

Rounded value of x

Call Signature

<U>(x, n): U

Type Parameters

U

U extends MathCollection<MathNumericType>

Parameters

x

MathNumericType

n

U

Returns

U

Call Signature

<U>(x, unit): U

Type Parameters

U

U extends MathCollection<Unit>

Parameters

x

U

unit

Unit

Returns

U

Call Signature

(x, unit): Unit

Parameters

x

Unit

unit

Unit

Returns

Unit

Call Signature

(x, n, unit): Unit

Parameters

x

Unit

n

number | BigNumber

unit

Unit

Returns

Unit

Call Signature

<U>(x, n, unit): U

Type Parameters

U

U extends MathCollection<Unit>

Parameters

x

U

n

number | BigNumber

unit

Unit

Returns

U