Skip to content

RelativeRoundingMethod

  • The core functions, which every industry uses.

How the formatRelative* functions round a fractional distance to a whole number of the unit displayed. It is applied to the signed value, where a past distance is negative: "floor" rounds toward negative infinity, "ceil" toward positive infinity, and "round" to the nearest whole number, a half going toward positive infinity.

import type { RelativeRoundingMethod } from "@northguild/gmt";
type RelativeRoundingMethod = "floor" | "ceil" | "round";

types/relative-rounding-method.ts

Accessibility
© 2026 NorthGuild · Licences

Code examples: MIT-0. Packages: MIT. Third-party data and components: their own licences, credited where they appear. Everything else: © 2026 NorthGuild, all rights reserved.