Skip to content

KBE3D / KBCore / Cesium / Math / factorial

函数: factorial()

factorial(n: number): number

Computes the factorial of the provided number.

参数

n

number

The number whose factorial is to be computed.

返回

number

The factorial of the provided number or undefined if the number is less than 0.

示例

ts
//Compute 7!, which is equal to 5040
const computedFactorial = Cesium.Math.factorial(7);

KBE3D @3.0.0 Copyright © 2024-present KBE3D