Skip to main content

LinearValue

Represents a value that can operate in linear space

Properties

magnitude

This item is read only and cannot be modified. Read Only
LinearValue.magnitude: number

Returns the magnitude of the linear value.

Functions

new

LinearValue.new(
constructor(number...) → T,
values({number})
) → LinearValue<T>

Constructs a new LinearValue object.

isLinear

LinearValue.isLinear(
valueany--

A value to check

) → boolean--

True if a linear value, false otherwise

Returns whether or not a value is a LinearValue object.

ToBaseValue

LinearValue:ToBaseValue() → T

Converts the value back to the base value

GetMagnitude

LinearValue:GetMagnitude() → number--

The magnitude of the linear value.

Returns the magnitude of the linear value.

Show raw api
{
    "functions": [
        {
            "name": "new",
            "desc": "Constructs a new LinearValue object.",
            "params": [
                {
                    "name": "constructor",
                    "desc": "",
                    "lua_type": "(number ...) -> T"
                },
                {
                    "name": "values",
                    "desc": "",
                    "lua_type": "({ number })"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "LinearValue<T>"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 22,
                "path": "src/spring/src/Shared/LinearValue.lua"
            }
        },
        {
            "name": "isLinear",
            "desc": "Returns whether or not a value is a LinearValue object.",
            "params": [
                {
                    "name": "value",
                    "desc": "A value to check",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "True if a linear value, false otherwise",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 35,
                "path": "src/spring/src/Shared/LinearValue.lua"
            }
        },
        {
            "name": "ToBaseValue",
            "desc": "Converts the value back to the base value",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "T"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 44,
                "path": "src/spring/src/Shared/LinearValue.lua"
            }
        },
        {
            "name": "GetMagnitude",
            "desc": "Returns the magnitude of the linear value.",
            "params": [],
            "returns": [
                {
                    "desc": "The magnitude of the linear value.",
                    "lua_type": "number"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 89,
                "path": "src/spring/src/Shared/LinearValue.lua"
            }
        }
    ],
    "properties": [
        {
            "name": "magnitude",
            "desc": "Returns the magnitude of the linear value.",
            "lua_type": "number",
            "readonly": true,
            "source": {
                "line": 105,
                "path": "src/spring/src/Shared/LinearValue.lua"
            }
        }
    ],
    "types": [],
    "name": "LinearValue",
    "desc": "Represents a value that can operate in linear space",
    "source": {
        "line": 6,
        "path": "src/spring/src/Shared/LinearValue.lua"
    }
}