Documentation ¶
Overview ¶
Package nums contain number related utility functions.
Index ¶
- func AspectRatio(srcRect image.Point, toResize uint64) image.Point
- func BigMergeFractionalPotions(sign bool, integer, fractional uint64, fractionalLength uint8) (dst *decimal.Big)
- func BigSeperateFractionalPotions(src *decimal.Big) (sign bool, integer, fractional uint64, fractionalLength uint8)
- func FractionalStringify(fractional, fractionalLength int, showPoint bool) (formatted string)
- func MergeSignFromUInt64(sign bool, src uint64) (dst int64)
- func SplitSignFromInt64(src int64) (sign bool, dst uint64)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AspectRatio ¶
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 ¶
FractionalStringify is a formatting function for a fractional part number.
func MergeSignFromUInt64 ¶
MergeSignFromUInt64 composes a signed integer with a sign and positive integer.
func SplitSignFromInt64 ¶
SplitSignFromInt64 decomposes a signed integer with a sign and positive integer.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.