mirror of
https://github.com/typst/typst
synced 2025-08-21 10:18:35 +08:00
Compare commits
2 Commits
c99f3ffc7d
...
30ddc4a7ca
Author | SHA1 | Date | |
---|---|---|---|
|
30ddc4a7ca | ||
|
d978f8c33a |
@ -604,7 +604,7 @@ impl Array {
|
|||||||
Ok(acc)
|
Ok(acc)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Calculates the product all items (works for all types that can be
|
/// Calculates the product of all items (works for all types that can be
|
||||||
/// multiplied).
|
/// multiplied).
|
||||||
#[func]
|
#[func]
|
||||||
pub fn product(
|
pub fn product(
|
||||||
|
@ -207,9 +207,9 @@ pub fn sqrt(
|
|||||||
/// ```
|
/// ```
|
||||||
#[func]
|
#[func]
|
||||||
pub fn root(
|
pub fn root(
|
||||||
/// The expression to take the root of
|
/// The expression to take the root of.
|
||||||
radicand: f64,
|
radicand: f64,
|
||||||
/// Which root of the radicand to take
|
/// Which root of the radicand to take.
|
||||||
index: Spanned<i64>,
|
index: Spanned<i64>,
|
||||||
) -> SourceResult<f64> {
|
) -> SourceResult<f64> {
|
||||||
if index.v == 0 {
|
if index.v == 0 {
|
||||||
@ -317,7 +317,7 @@ pub fn asin(
|
|||||||
/// ```
|
/// ```
|
||||||
#[func(title = "Arccosine")]
|
#[func(title = "Arccosine")]
|
||||||
pub fn acos(
|
pub fn acos(
|
||||||
/// The number whose arcsine to calculate. Must be between -1 and 1.
|
/// The number whose arccosine to calculate. Must be between -1 and 1.
|
||||||
value: Spanned<Num>,
|
value: Spanned<Num>,
|
||||||
) -> SourceResult<Angle> {
|
) -> SourceResult<Angle> {
|
||||||
let val = value.v.float();
|
let val = value.v.float();
|
||||||
@ -387,7 +387,7 @@ pub fn cosh(
|
|||||||
value.cosh()
|
value.cosh()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Calculates the hyperbolic tangent of an hyperbolic angle.
|
/// Calculates the hyperbolic tangent of a hyperbolic angle.
|
||||||
///
|
///
|
||||||
/// ```example
|
/// ```example
|
||||||
/// #calc.tanh(0) \
|
/// #calc.tanh(0) \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user