'\" t .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" .TH Num.format 3 2025-04-21 "Tomo man-pages" .SH NAME Num.format \- convert a number to text .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf .BI Num.format\ :\ func(n:\ Num,\ precision:\ Int\ =\ 0\ ->\ Text) .fi .SH DESCRIPTION Formats a number as a text with a specified precision. .SH ARGUMENTS .TS allbox; lb lb lbx lb l l l l. Name Type Description Default n Num The number to be formatted. - precision Int The number of decimal places. Default is `0`. 0 .TE .SH RETURN A text representation of the number with the specified precision. .SH EXAMPLES .EX >> (3.14159).format(precision=2) = "3.14" .EE