🪛
MTools
  • 📷Description
  • ✏️Strings
  • 🔢Numbers
  • 📂Table
  • 📶Network
  • 🍪Client
  • 🗃️FileSystem
  • 🍭Render
  • 🧬Animation
  • 🧸AntiAims
  • ⚙️Threading
  • 💻Panorama
Powered by GitBook
On this page
  • Round
  • Fixed

Numbers

Auxiliary functions for Numbers types.

Round

MTools.Number.Round(value);

Name
Type
Description

value

number

The number to round off

Allows you to round a number to the nearest. Example usage:

print(MTools.Number.Round(0.5));
-- Will return the number 1.

Fixed

MTools.Number.Fixed(value, digits);

Name
Type
Description

value

number

The number for the fix

digits

number

Number of digits after the point

Allows you to trim a number to the desired size. Example usage:

print(MTools.Number.Fixed(0.123456789, 2));
-- Will return the number 0.12.
PreviousStringsNextTable

Last updated 2 years ago

🔢