units

package
v0.0.0-...-55976d6 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package units defines numeric unit constants shared across the application.

Index

Constants

View Source
const KiB = 1024

KiB is one kibibyte.

View Source
const MiB = 1024 * KiB

MiB is one mebibyte.

View Source
const PercentScale = 100

PercentScale is the multiplier used for whole-percent calculations.

View Source
const TokenMillion = 1_000_000

TokenMillion is one million tokens.

View Source
const TokenThousand = 1000

TokenThousand is one thousand tokens.

Variables

This section is empty.

Functions

func PercentOf

func PercentOf(value, total int) int

PercentOf returns a whole percentage clamped to PercentScale.

Types

This section is empty.

Jump to

Keyboard shortcuts

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