nums

package
Version: v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2022 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package nums contain number related utility functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AspectRatio

func AspectRatio(srcRect image.Point, toResize uint64) image.Point

AspectRatio returns geometry that conforms to the aspect ratio.

func BigMergeFractionalPotions

func BigMergeFractionalPotions(sign bool, integer, fractional uint64, fractionalLength uint8) (dst *decimal.Big)

BigMergeFractionalPotions compose a decimal number with a sign, integer, and fractional parts.

func BigSeperateFractionalPotions

func BigSeperateFractionalPotions(src *decimal.Big) (sign bool, integer, fractional uint64, fractionalLength uint8)

BigSeperateFractionalPotions decompose a decimal number with a sign, integer, and fractional parts.

func FractionalStringify

func FractionalStringify(fractional, fractionalLength int, showPoint bool) (formatted string)

FractionalStringify is a formatting function for a fractional part number.

func MergeSignFromUInt64

func MergeSignFromUInt64(sign bool, src uint64) (dst int64)

MergeSignFromUInt64 composes a signed integer with a sign and positive integer.

func SplitSignFromInt64

func SplitSignFromInt64(src int64) (sign bool, dst uint64)

SplitSignFromInt64 decomposes a signed integer with a sign and positive integer.

Types

This section is empty.

Jump to

Keyboard shortcuts

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