math

package
v0.97.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 6, 2021 License: MIT Imports: 1 Imported by: 2

Documentation

Overview

Package math provides access to useful numeric functions available in Neo VM.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Abs

func Abs(a int) int

Abs returns absolute value of a.

func Max

func Max(a, b int) int

Max returns maximum of a, b.

func Min

func Min(a, b int) int

Min returns minimum of a, b.

func Pow

func Pow(a, b int) int

Pow returns a^b using POW VM opcode. b must be >= 0 and <= 2^31-1.

func Sign

func Sign(a int) int

Sign returns:

-1 if x <  0
 0 if x == 0
+1 if x >  0

func Sqrt

func Sqrt(x int) int

Sqrt returns positive square root of x rounded down.

func Within

func Within(x, a, b int) bool

Within returns true if a <= x < b.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL