Have floating point functions take their parameters by value.
Make all of the methods in `std::num::Float` take `self` and their other parameters by value. Some of the `Float` methods took their parameters by value, and others took them by reference. This standardises them to one convention. The `Float` trait is intended for the built in IEEE 754 numbers only so we don't have to worry about the trait serving types of larger sizes. [breaking-change]
This commit is contained in:
parent
fe47202034
commit
bed70a42ec
9 changed files with 167 additions and 167 deletions
|
|
@ -147,7 +147,7 @@ impl IndependentSample<f64> for GammaSmallShape {
|
|||
fn ind_sample<R: Rng>(&self, rng: &mut R) -> f64 {
|
||||
let Open01(u) = rng.gen::<Open01<f64>>();
|
||||
|
||||
self.large_shape.ind_sample(rng) * u.powf(&self.inv_shape)
|
||||
self.large_shape.ind_sample(rng) * u.powf(self.inv_shape)
|
||||
}
|
||||
}
|
||||
impl IndependentSample<f64> for GammaLargeShape {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue