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: