# Number.to_fixed ## Function Format a number to specified decimal places. ## Syntax ```bt number.to_fixed(digits) ``` ## Parameters | Parameters | Type | Required | Default value | Description | | ------ | ------ | ------ | ------ | ------ | | digits | Int | No | 0 | Number of decimal places; negative numbers are treated as 0. | ## Return value | Type | Description | | ------ | ------ | | String | Returns a string with fixed decimal places. | ## Example ```bt num = 3.14159 result = num.to_fixed(2) // Output: 3.14 print result ``` ## Notes - The result is a string, not a number.