Table of contents
Getting Started
Installation
Usage
New Changes
Migration Guide
Basic Syntax
Data Types
Expressions
Variables
Conditions
Commands
Arrays
Loops
Functions
Importing
Advanced Syntax
As Cast
Builtins
Type Condition
Compiler Flags
Standard Library
Array
Date
Environment
FileSystem
HTTP
Math
Text
Contributing
How to
Guide
Compiler structure
Amber by Example
ShellCheck tester
Ubuntu Updater
Bot Detector
LSP Installer
Math
math_abs
import { math_abs } from "std/math"
pub fun math_abs(number: Num): Num
Returns the absolute value of a number
You can check the original tests for code examples:
math_ceil
import { math_ceil } from "std/math"
pub fun math_ceil(number: Num): Num
Returns the smallest integer greater than or equal to a number
You can check the original tests for code examples:
math_floor
import { math_floor } from "std/math"
pub fun math_floor(number: Num): Num
Returns the largest integer less than or equal to a number
You can check the original tests for code examples:
math_round
import { math_round } from "std/math"
pub fun math_round(number: Num): Num
Returns a number, rounded to the nearest integer
You can check the original tests for code examples:
math_sum
import { math_sum } from "std/math"
pub fun math_sum(list: [Num]): Num
Sums an array's contents
You can check the original tests for code examples:
Table of contents
Getting Started
Installation
Usage
New Changes
Migration Guide
Basic Syntax
Data Types
Expressions
Variables
Conditions
Commands
Arrays
Loops
Functions
Importing
Advanced Syntax
As Cast
Builtins
Type Condition
Compiler Flags
Standard Library
Array
Date
Environment
FileSystem
HTTP
Math
Text
Contributing
How to
Guide
Compiler structure
Amber by Example
ShellCheck tester
Ubuntu Updater
Bot Detector
LSP Installer