Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Programming with math

Use Unity's mathematical APIs to apply trigonometric, logarithmic, and other functions in your application, move objects with vectors, and generate random values.
Read time 1 minuteLast updated 6 days ago

Unity provides several APIs for mathematical operations commonly required in games programming, including common mathe functions, random numbers, and systems such as vectors, matrices, and quaternions.

Topic

Description

Introduction to math programming in UnityUnderstand the different math APIs Unity provides and how they compare.
Unity Engine math APIsUse the collection of math APIs in the
Unity.Engine
namespace to access common mathematical operations, including trigonometric and logarithmic functions, random number generation, and working with vectors, matrices, and quaternions.
Unity Mathematics APIsUse the collection of SIMD-friendly, Burst-compilable math APIs in the
Unity.Mathematics
namespace to access common mathematical operations, including trigonometric and logarithmic functions, random number generation, and working with vectors, matrices, and quaternions.

Additional resources