Origin Scripting Language
Ctrlk
originOS
  • Basics
    • Syntax
    • Types
    • The Execution Loop
    • Defining Variables
    • Assignment Operators
    • Local Scoping
    • Typed Variables
  • Operators
    • Mathematical Usage
    • Text Usage
    • String Concatenation Operator (+)
    • Array Operations
    • Comparative Operators
    • Logical Operators
    • Bitwise operators
    • Pipe Operator (|>)
    • Nullish Coalescing Operator (??)
  • Program Flow
    • If Statements
    • Switch Case
    • Iteration
    • While And Until
  • Arrays And Objects
    • Making Arrays Or Objects
    • Modifying An Array
    • Clone Objects And References
    • Object Operations
    • Object Property Shorthand
  • Environment
    • The Window System
    • Events
    • Mouse Cursor
    • Camera
    • Sound System
    • Input Simulation
    • Running Other Languages
    • Notifications
    • Send Data Between Windows
    • Clipboard
    • Interfacing With Rightclick
    • Permissions
    • Files
  • Storage
    • Save DB
    • Local DB
  • Custom Syntax
    • Commands
    • Methods
    • Functions
    • Inline
    • Lambda
    • Spread Operator
    • Typed Parameters
    • Classes
    • Promises
  • Commands
    • Debugging
    • Rendering
  • Functions
    • Math
      • Math()
      • random(low,high)
      • min(num1,num2)
      • max(num1,num2)
      • lcm(num1,num2)
      • gcd(num1,num2)
      • sum(num1,..)
      • average(num1,..)
      • dist(x1,y1,x2,y2)
      • degtorad(angle)
      • radtodeg(angle)
      • noise(x, y, z)
      • octaveNoise(x, y, z, octaves, persistence)
    • Types
    • Encoding
    • function()
    • formatFileSize(bytes)
    • getGamepads()
    • import(path)
    • ouidNew()
    • parseFilePath(path)
  • Global Variables
    • Overview
    • System Information
    • User Information
    • Date and Time
    • Input State
    • Display and UI
    • Network
    • File System
  • Methods
    • Strings
    • Numbers
    • Arrays
    • Objects
    • Functions
    • Keyboard
    • JSON
    • Types
    • Networking
    • Timestamp
Powered by GitBook
On this page

Was this helpful?

Edit
  1. Functions

Math

Math()random(low,high)min(num1,num2)max(num1,num2)lcm(num1,num2)gcd(num1,num2)sum(num1,..)average(num1,..)dist(x1,y1,x2,y2)degtorad(angle)radtodeg(angle)noise(x, y, z)octaveNoise(x, y, z, octaves, persistence)
Previous3D RenderingNextMath()

Was this helpful?