compare

package module
v0.0.0-...-3b36e4f Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2015 License: GPL-2.0 Imports: 2 Imported by: 0

README

Compare

GoDoc

Compare objects. Compare(a, b) = a - b

  • Returns 0 (equality) for a = b.
  • Returns - (negative) for a < b.
  • Returns + (positive) for a > b.

Install

go get github.com/gomacro/compare
import "github.com/gomacro/compare"

License

GPLv2

Version: v0.1

Documentation

Overview

Package compare provides a compare functions to compare two objects.

Returns 0 for equality.

Returns - (negative) for a < b.

Returns + (positive) for a > b.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Abs

func Abs(a, b *complex128) int

Abs compares two complex numbers by absolute value.

func Byte

func Byte(a, b *byte) int

Byte compares two numbers.

func Float32

func Float32(a, b *float32) int

Float32 compares two numbers.

func Float64

func Float64(a, b *float64) int

Float64 compares two numbers.

func Imag

func Imag(a, b *complex128) int

Imag compares two complex numbers by imaginary part.

func Int

func Int(a, b *int) (r int)

Int compares two numbers.

func Int16

func Int16(a, b *int16) int

Int16 compares two numbers.

func Int32

func Int32(a, b *int32) int

Int32 compares two numbers.

func Int64

func Int64(a, b *int64) (r int)

Int64 compares two numbers.

func Int8

func Int8(a, b *int8) int

Int8 compares two numbers.

func Real

func Real(a, b *complex128) int

Real compares two complex numbers by real part.

func Rune

func Rune(a, b *rune) int

Rune compares two numbers.

func Uint

func Uint(a, b *uint) (r int)

Uint compares two numbers.

func Uint16

func Uint16(a, b *uint16) int

Uint16 compares two numbers.

func Uint32

func Uint32(a, b *uint32) (r int)

Uint32 compares two numbers.

func Uint64

func Uint64(a, b *uint64) (r int)

Uint64 compares two numbers.

func Uint8

func Uint8(a, b *uint8) int

Uint8 compares two numbers.

Types

This section is empty.

Jump to

Keyboard shortcuts

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