pkg

package
v0.0.0-...-c6e3130 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2022 License: Apache-2.0 Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Div

func Div(dividend, divisor int) (int, error)

Div returns dividend/divisor. Returns 0 and one of the following errors in the following cases:

  • If divisor is zero, returns an error that you can check with IsDivByZeroErr
  • If divisor is one, returns an error that you can check with IsDivByOneErr
  • If divisor > dividend, returns an error that you can check with IsDivisorGTDividendErr

func IsDivByOneErr

func IsDivByOneErr(e error) bool

IsDivByOneErr returns true if e is a divide by one error

func IsDivByZeroErr

func IsDivByZeroErr(e error) bool

IsDivByZeroErr returns true if e is a divide by zero error

func IsDivisorGTDividendErr

func IsDivisorGTDividendErr(e error) bool

IsDivisorGTDividendErr returns true if e is a divisor > dividend error

Types

This section is empty.

Jump to

Keyboard shortcuts

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