mirror of
https://github.com/typst/typst
synced 2025-08-12 06:07:54 +08:00
Move reference link from first line to argument docs
This commit is contained in:
parent
a00aea82c5
commit
e271a03a00
@ -110,8 +110,7 @@ impl f64 {
|
|||||||
f64::signum(self)
|
f64::signum(self)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Interprets bytes as a float in [IEEE 754](https://en.wikipedia.org/wiki/IEEE_754)
|
/// Interprets bytes as a float.
|
||||||
/// format.
|
|
||||||
///
|
///
|
||||||
/// ```example
|
/// ```example
|
||||||
/// #float.from-bytes(bytes((0, 0, 0, 0, 0, 0, 240, 63))) \
|
/// #float.from-bytes(bytes((0, 0, 0, 0, 0, 0, 240, 63))) \
|
||||||
@ -122,9 +121,9 @@ impl f64 {
|
|||||||
/// The bytes that should be converted to a float.
|
/// The bytes that should be converted to a float.
|
||||||
///
|
///
|
||||||
/// Must have a length of either 4 or 8. The bytes are then
|
/// Must have a length of either 4 or 8. The bytes are then
|
||||||
/// interpreted in the binary32 (single-precision) or
|
/// interpreted in [IEEE 754](https://en.wikipedia.org/wiki/IEEE_754)'s
|
||||||
/// binary64 (double-precision) format depending on the
|
/// binary32 (single-precision) or binary64 (double-precision) format
|
||||||
/// length of the bytes.
|
/// depending on the length of the bytes.
|
||||||
bytes: Bytes,
|
bytes: Bytes,
|
||||||
/// The endianness of the conversion.
|
/// The endianness of the conversion.
|
||||||
#[named]
|
#[named]
|
||||||
@ -148,8 +147,7 @@ impl f64 {
|
|||||||
bail!("bytes must have a length of 4 or 8");
|
bail!("bytes must have a length of 4 or 8");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Converts a float to bytes in [IEEE 754](https://en.wikipedia.org/wiki/IEEE_754)
|
/// Converts a float to bytes.
|
||||||
/// format.
|
|
||||||
///
|
///
|
||||||
/// ```example
|
/// ```example
|
||||||
/// #array(1.0.to-bytes(endian: "big")) \
|
/// #array(1.0.to-bytes(endian: "big")) \
|
||||||
@ -165,7 +163,8 @@ impl f64 {
|
|||||||
/// The size of the resulting bytes.
|
/// The size of the resulting bytes.
|
||||||
///
|
///
|
||||||
/// This must be either 4 or 8. The call will return the
|
/// This must be either 4 or 8. The call will return the
|
||||||
/// representation of this float in either the binary32
|
/// representation of this float in either
|
||||||
|
/// [IEEE 754](https://en.wikipedia.org/wiki/IEEE_754)'s binary32
|
||||||
/// (single-precision) or binary64 (double-precision) format
|
/// (single-precision) or binary64 (double-precision) format
|
||||||
/// depending on the provided size.
|
/// depending on the provided size.
|
||||||
#[named]
|
#[named]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user