Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/float.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2247,6 +2247,7 @@ macro_rules! float_const_impl {
#[allow(non_snake_case)]
pub trait FloatConst {
$(#[$doc] fn $constant() -> Self;)+
#[doc = "Return the full circle constant `τ`."] fn TAU() -> Self;
}
float_const_impl! { @float f32, $($constant,)+ }
float_const_impl! { @float f64, $($constant,)+ }
Expand All @@ -2255,6 +2256,7 @@ macro_rules! float_const_impl {
impl FloatConst for $T {
constant! {
$( $constant() -> $T::consts::$constant; )+
TAU() -> 6.28318530717958647692528676655900577;
}
}
);
Expand Down Expand Up @@ -2289,7 +2291,7 @@ float_const_impl! {
LOG10_E,
#[doc = "Return `log2(e)`."]
LOG2_E,
#[doc = "Return Archimedes’ constant."]
#[doc = "Return Archimedes’ constant `π`."]
PI,
#[doc = "Return `sqrt(2.0)`."]
SQRT_2,
Expand Down