diff options
| author | Brendan Zabarauskas <bjzaba@yahoo.com.au> | 2013-04-29 22:15:58 +1000 |
|---|---|---|
| committer | Brendan Zabarauskas <bjzaba@yahoo.com.au> | 2013-04-29 22:15:58 +1000 |
| commit | d3f494f5c3ce96da2e0c8090fc17a8738e4396c1 (patch) | |
| tree | 463ace42bc61f9e62e87839ecaae5f057cf81eb9 /src/libcore/num/num.rs | |
| parent | 20ad931bf337db2efd25e6571e322d31b5b83877 (diff) | |
Merge Exponential and Hyperbolic traits
The Hyperbolic Functions are trivially implemented in terms of `exp`, so it's simpler to group them the Exponential trait. In the future these would have default implementations.
Diffstat (limited to 'src/libcore/num/num.rs')
| -rw-r--r-- | src/libcore/num/num.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libcore/num/num.rs b/src/libcore/num/num.rs index 3e43ebfef12..30a1213f7ff 100644 --- a/src/libcore/num/num.rs +++ b/src/libcore/num/num.rs @@ -131,9 +131,9 @@ pub trait Exponential { fn log(&self) -> Self; fn log2(&self) -> Self; fn log10(&self) -> Self; -} -pub trait Hyperbolic: Exponential { + // The Hyperbolic Functions are trivially implemented in terms of `exp`, so it's simpler + // to group them within this trait. In the future these would have default implementations. fn sinh(&self) -> Self; fn cosh(&self) -> Self; fn tanh(&self) -> Self; @@ -146,7 +146,7 @@ pub trait Real: Signed + Fractional + Algebraic + Trigonometric - + Hyperbolic { + + Exponential { // Common Constants // FIXME (#5527): These should be associated constants fn pi() -> Self; |
