Skip to main content

Probability

Probability utility functions

Functions​

boxMuller​

Probability.boxMuller() → number

Returns a boxMuller random distribution

normal​

Probability.normal(
mean: number,
standardDeviation: number
) → number

Returns a normal distribution

boundedNormal​

Probability.boundedNormal(
mean: number,
standardDeviation: number,
hardMin: number,
hardMax: number
) → number

Returns a bounded normal, clamping the normal value

Show raw api
{
    "functions": [
        {
            "name": "boxMuller",
            "desc": "Returns a boxMuller random distribution",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 12,
                "path": "src/probability/src/Shared/Probability.lua"
            }
        },
        {
            "name": "normal",
            "desc": "Returns a normal distribution",
            "params": [
                {
                    "name": "mean",
                    "desc": "",
                    "lua_type": "number"
                },
                {
                    "name": "standardDeviation",
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 22,
                "path": "src/probability/src/Shared/Probability.lua"
            }
        },
        {
            "name": "boundedNormal",
            "desc": "Returns a bounded normal, clamping the normal value",
            "params": [
                {
                    "name": "mean",
                    "desc": "",
                    "lua_type": "number"
                },
                {
                    "name": "standardDeviation",
                    "desc": "",
                    "lua_type": "number"
                },
                {
                    "name": "hardMin",
                    "desc": "",
                    "lua_type": "number"
                },
                {
                    "name": "hardMax",
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 34,
                "path": "src/probability/src/Shared/Probability.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "Probability",
    "desc": "Probability utility functions",
    "source": {
        "line": 5,
        "path": "src/probability/src/Shared/Probability.lua"
    }
}