Lua API
  • 🔎Overview
  • Getting started
    • 🚀Creating scripts
    • 📓Metadata
    • ☎ïļCallbacks
    • 🧠Examples
    • 🌐Useful resources
  • Documentation
    • ⚙ïļNamespaces
      • ðŸ–ĨïļGui
      • ✏ïļRender
      • 🏎ïļEngine
      • ðŸ”ĒMath
      • ⚙ïļUtilities
      • 🙎Entities
      • 📖Database
      • ðŸ–ąïļInput
      • 🌌Panorama
      • ðŸŠķMaterials
      • 📂Filesystem
      • 🗃ïļZip
    • ⚙ïļInstances
      • ⚙ïļGlobal Vars
      • ⚙ïļFatality
      • ⚙ïļGamerules
      • ⚙ïļServer
    • ⚙ïļDatatypes
      • ðŸ–Ĩïļcontrol
      • ðŸ–Ĩïļcheckbox
      • ðŸ–Ĩïļcombobox
      • ðŸ–Ĩïļcolor_picker
      • ðŸ–Ĩïļslider
      • ðŸ–Ĩïļtextbox
      • ðŸ–Ĩïļlist
      • ⚙ïļentity
      • ⚙ïļplayer_info
      • ⚙ïļweapon_info
      • ⚙ïļuser_cmd
      • ⚙ïļtrace_t
      • ⚙ïļvec3
      • ⚙ïļtimer
      • ⚙ïļcvar
      • ⚙ïļshot_info
      • ⚙ïļgame_event
      • ⚙ïļmaterial
      • ⚙ïļmaterial_var
      • ⚙ïļzip
      • ⚙ïļanimator
Powered by GitBook

ÂĐ 2025 - FATALITY

On this page
  • Functions
  • vec3
  • vector_angles
  • angle_vectors
  1. Documentation
  2. Namespaces

Math

math namespace

Functions

vec3

local new_vec = math.vec3(10, 0, 0)

x

number

❌

y

number

parameter x

z

number

parameter x

Returns:

vector object

vector_angles

math.vector_angles(math.vec3(0.5, 0.2, 0.8))

forward

the forward vector to convert to angles

Returns:

angles

angle_vectors

math.angle_vectors(math.vec3(0, 90, 0))

angle

the angle to convert to directions

Returns:

forward

right

up

PreviousEngineNextUtilities

Last updated 2 years ago

⚙ïļ
ðŸ”Ē
Parameter
Datatype
Default
Value
Datatype
math.vec3
Parameter
Datatype
Description
math.vec3
Value
Datatype
math.vec3
Parameter
Datatype
Description
math.vec3
Value
Datatype
math.vec3
math.vec3
math.vec3