mirror of
https://github.com/typst/typst
synced 2025-06-08 05:06:24 +08:00
Improve calc.round
documentation (#6345)
This commit is contained in:
parent
83e249dd33
commit
4329a15a1c
@ -708,12 +708,13 @@ pub fn fract(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Rounds a number to the nearest integer away from zero.
|
/// Rounds a number to the nearest integer.
|
||||||
///
|
///
|
||||||
/// Optionally, a number of decimal places can be specified.
|
/// Half-integers are rounded away from zero.
|
||||||
///
|
///
|
||||||
/// If the number of digits is negative, its absolute value will indicate the
|
/// Optionally, a number of decimal places can be specified. If negative, its
|
||||||
/// amount of significant integer digits to remove before the decimal point.
|
/// absolute value will indicate the amount of significant integer digits to
|
||||||
|
/// remove before the decimal point.
|
||||||
///
|
///
|
||||||
/// Note that this function will return the same type as the operand. That is,
|
/// Note that this function will return the same type as the operand. That is,
|
||||||
/// applying `round` to a [`float`] will return a `float`, and to a [`decimal`],
|
/// applying `round` to a [`float`] will return a `float`, and to a [`decimal`],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user