Skip to content

Commit 619e33b

Browse files
committed
Add FRAC_1_SQRT_2PI doc alias to FRAC_1_SQRT_TAU
This is create symmetry between the already existing TAU constant (2pi) and the newly-introduced FRAC_1_SQRT_2PI, keeping the more common name while increasing visibility.
1 parent 0444ab8 commit 619e33b

File tree

4 files changed

+4
-0
lines changed

4 files changed

+4
-0
lines changed

core/src/num/f128.rs

+1
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ pub mod consts {
6969
0.564189583547756286948079451560772585844050629328998856844086_f128;
7070

7171
/// 1/sqrt(2π)
72+
#[doc(alias = "FRAC_1_SQRT_TAU")]
7273
#[unstable(feature = "f128", issue = "116909")]
7374
// Also, #[unstable(feature = "more_float_constants", issue = "103883")]
7475
pub const FRAC_1_SQRT_2PI: f128 =

core/src/num/f16.rs

+1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ pub mod consts {
6868
pub const FRAC_1_SQRT_PI: f16 = 0.564189583547756286948079451560772586_f16;
6969

7070
/// 1/sqrt(2π)
71+
#[doc(alias = "FRAC_1_SQRT_TAU")]
7172
#[unstable(feature = "f16", issue = "116909")]
7273
// Also, #[unstable(feature = "more_float_constants", issue = "103883")]
7374
pub const FRAC_1_SQRT_2PI: f16 = 0.398942280401432677939946059934381868_f16;

core/src/num/f32.rs

+1
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,7 @@ pub mod consts {
328328
pub const FRAC_1_SQRT_PI: f32 = 0.564189583547756286948079451560772586_f32;
329329

330330
/// 1/sqrt(2π)
331+
#[doc(alias = "FRAC_1_SQRT_TAU")]
331332
#[unstable(feature = "more_float_constants", issue = "103883")]
332333
pub const FRAC_1_SQRT_2PI: f32 = 0.398942280401432677939946059934381868_f32;
333334

core/src/num/f64.rs

+1
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,7 @@ pub mod consts {
328328
pub const FRAC_1_SQRT_PI: f64 = 0.564189583547756286948079451560772586_f64;
329329

330330
/// 1/sqrt(2π)
331+
#[doc(alias = "FRAC_1_SQRT_TAU")]
331332
#[unstable(feature = "more_float_constants", issue = "103883")]
332333
pub const FRAC_1_SQRT_2PI: f64 = 0.398942280401432677939946059934381868_f64;
333334

0 commit comments

Comments
 (0)