mirror of
https://github.com/danbulant/cushy
synced 2026-07-07 04:00:45 +00:00
parent
0fb93c7be8
commit
d739ef1b79
1 changed files with 10 additions and 0 deletions
|
|
@ -1289,6 +1289,9 @@ impl MulAssign for ZeroToOne {
|
||||||
impl Div for ZeroToOne {
|
impl Div for ZeroToOne {
|
||||||
type Output = Self;
|
type Output = Self;
|
||||||
|
|
||||||
|
/// Divides `self` by `rhs`.
|
||||||
|
///
|
||||||
|
/// If `rhs` is `0.`, the result will be [`ZeroToOne::ONE`].
|
||||||
fn div(mut self, rhs: Self) -> Self::Output {
|
fn div(mut self, rhs: Self) -> Self::Output {
|
||||||
self /= rhs;
|
self /= rhs;
|
||||||
self
|
self
|
||||||
|
|
@ -1296,6 +1299,9 @@ impl Div for ZeroToOne {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl DivAssign for ZeroToOne {
|
impl DivAssign for ZeroToOne {
|
||||||
|
/// Divides `self` by `rhs`.
|
||||||
|
///
|
||||||
|
/// If `rhs` is `0.`, the result will be [`ZeroToOne::ONE`].
|
||||||
fn div_assign(&mut self, rhs: Self) {
|
fn div_assign(&mut self, rhs: Self) {
|
||||||
self.checked_div(rhs);
|
self.checked_div(rhs);
|
||||||
}
|
}
|
||||||
|
|
@ -1306,6 +1312,8 @@ impl Div<f32> for ZeroToOne {
|
||||||
|
|
||||||
/// Divides `self` by `rhs`.
|
/// Divides `self` by `rhs`.
|
||||||
///
|
///
|
||||||
|
/// If `rhs` is `0.`, the result will be [`ZeroToOne::ONE`].
|
||||||
|
///
|
||||||
/// # Panics
|
/// # Panics
|
||||||
///
|
///
|
||||||
/// This function panics if `rhs` is not a number.
|
/// This function panics if `rhs` is not a number.
|
||||||
|
|
@ -1318,6 +1326,8 @@ impl Div<f32> for ZeroToOne {
|
||||||
impl DivAssign<f32> for ZeroToOne {
|
impl DivAssign<f32> for ZeroToOne {
|
||||||
/// Divides `self` by `rhs`.
|
/// Divides `self` by `rhs`.
|
||||||
///
|
///
|
||||||
|
/// If `rhs` is `0.`, the result will be [`ZeroToOne::ONE`].
|
||||||
|
///
|
||||||
/// # Panics
|
/// # Panics
|
||||||
///
|
///
|
||||||
/// This function panics if `rhs` is not a number.
|
/// This function panics if `rhs` is not a number.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue