Skip to main content

RandomVector3Utils

Utility functions involving RandomVector3Utils

Functions

getRandomUnitVector

RandomVector3Utils.getRandomUnitVector() → Vector3

Equal distribution unit vectors around a sphere

gaussianRandom

RandomVector3Utils.gaussianRandom(
meanVector3,--

center

spreadVector3--

std deviation

) → Vector3

Computes a gaussian random vector3.

getDirectedRandomUnitVector

RandomVector3Utils.getDirectedRandomUnitVector(
directionVector3,
angleRadnumber--

Angle in radians

) → Vector3

Gets a uniformally distributed random unit vector3 in the direction specified.

Show raw api
{
    "functions": [
        {
            "name": "getRandomUnitVector",
            "desc": "Equal distribution unit vectors around a sphere",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Vector3"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 12,
                "path": "src/vector3utils/src/Shared/RandomVector3Utils.lua"
            }
        },
        {
            "name": "gaussianRandom",
            "desc": "Computes a gaussian random vector3.",
            "params": [
                {
                    "name": "mean",
                    "desc": "center",
                    "lua_type": "Vector3"
                },
                {
                    "name": "spread",
                    "desc": "std deviation",
                    "lua_type": "Vector3"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Vector3"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 33,
                "path": "src/vector3utils/src/Shared/RandomVector3Utils.lua"
            }
        },
        {
            "name": "getDirectedRandomUnitVector",
            "desc": "Gets a uniformally distributed random unit vector3 in the direction\nspecified.",
            "params": [
                {
                    "name": "direction",
                    "desc": "",
                    "lua_type": "Vector3"
                },
                {
                    "name": "angleRad",
                    "desc": "Angle in radians",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Vector3"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 49,
                "path": "src/vector3utils/src/Shared/RandomVector3Utils.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "RandomVector3Utils",
    "desc": "Utility functions involving RandomVector3Utils",
    "source": {
        "line": 5,
        "path": "src/vector3utils/src/Shared/RandomVector3Utils.lua"
    }
}