mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-01 04:10:07 +00:00
Remove trailing whitespace
This commit is contained in:
@@ -23,7 +23,7 @@ _f64_info := Float_Info{52, 11, -1023}
|
||||
/*
|
||||
Converts a floating-point number to a string with the specified format and precision.
|
||||
|
||||
**Inputs**
|
||||
**Inputs**
|
||||
|
||||
buf: A byte slice to store the resulting string
|
||||
val: The floating-point value to be converted
|
||||
@@ -40,7 +40,7 @@ Example:
|
||||
bit_size := 64
|
||||
result := strconv.generic_ftoa(buf[:], val, fmt, precision, bit_size) -> "3.14"
|
||||
|
||||
**Returns**
|
||||
**Returns**
|
||||
- A byte slice containing the formatted string
|
||||
*/
|
||||
generic_ftoa :: proc(buf: []byte, val: f64, fmt: byte, precision, bit_size: int) -> []byte {
|
||||
@@ -122,7 +122,7 @@ generic_ftoa :: proc(buf: []byte, val: f64, fmt: byte, precision, bit_size: int)
|
||||
/*
|
||||
Converts a decimal floating-point number into a byte buffer with the given format
|
||||
|
||||
**Inputs**
|
||||
**Inputs**
|
||||
- buf: The byte buffer to store the formatted number
|
||||
- shortest: If true, generates the shortest representation of the number
|
||||
- neg: If true, the number is negative
|
||||
@@ -130,7 +130,7 @@ Converts a decimal floating-point number into a byte buffer with the given forma
|
||||
- precision: The number of digits after the decimal point
|
||||
- fmt: The format specifier (accepted values: 'f', 'F', 'e', 'E', 'g', 'G')
|
||||
|
||||
**Returns**
|
||||
**Returns**
|
||||
- A byte slice containing the formatted decimal floating-point number
|
||||
*/
|
||||
format_digits :: proc(buf: []byte, shortest: bool, neg: bool, digs: Decimal_Slice, precision: int, fmt: byte) -> []byte {
|
||||
@@ -256,7 +256,7 @@ format_digits :: proc(buf: []byte, shortest: bool, neg: bool, digs: Decimal_Slic
|
||||
/*
|
||||
Rounds the given decimal number to its shortest representation, considering the provided floating-point format
|
||||
|
||||
**Inputs**
|
||||
**Inputs**
|
||||
- d: The decimal number to round
|
||||
- mant: The mantissa of the floating-point number
|
||||
- exp: The exponent of the floating-point number
|
||||
@@ -331,11 +331,11 @@ round_shortest :: proc(d: ^decimal.Decimal, mant: u64, exp: int, flt: ^Float_Inf
|
||||
/*
|
||||
Converts a decimal number to its floating-point representation with the given format and returns the resulting bits
|
||||
|
||||
**Inputs**
|
||||
**Inputs**
|
||||
- d: Pointer to the decimal number to convert
|
||||
- info: Pointer to the Float_Info structure containing information about the floating-point format
|
||||
|
||||
**Returns**
|
||||
**Returns**
|
||||
- b: The bits representing the floating-point number
|
||||
- overflow: A boolean indicating whether an overflow occurred during conversion
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user