intutils

package
v0.0.0-...-1ed8eff Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Abs

func Abs[INT types.SignedInteger](number INT) INT

Abs returns the absolute value of the given number

func Diff

func Diff[INT types.SignedInteger](a, b INT) INT

Diff returns the difference between the two numbers as Diff(a, b) = a - b

func Equals

func Equals[INT types.Integer](a, b INT) bool

Equals returns true if the two numbers are equal and false otherwise

func Length

func Length[INT types.SignedInteger](number INT) INT

Length returns the number of digits in the number

func Power

func Power[INT types.Integer](a, b INT) INT

Power returns the power of the number as Power(a, b) = a^b. If b is negatice, it panics

func Product

func Product[INT types.SignedInteger](a, b INT) INT

Product returns the product of the two numbers as Product(a, b) = a * b

func Quotient

func Quotient[INT types.SignedInteger](a, b INT) INT

Quotient returns the quotient of the two numbers as Quotient(a, b) = a / b as integer

func Sum

func Sum[INT types.SignedInteger](a, b INT) INT

Sum returns the sum of the two numbers as Sum(a, b) = a + b

Types

This section is empty.

Jump to

Keyboard shortcuts

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