use super::gen_decimal_qoperations;
use crate::{Decimal, context::get_context, error::MPDecimalError};
use std::ops::{Rem, RemAssign};
impl Decimal {
gen_decimal_qoperations!(
checked_rem(Decimal: get_inner) => mpd_qrem;
);
}
impl Rem for Decimal {
type Output = Decimal;
fn rem(self, rhs: Self) -> Self::Output {
self.checked_rem(&rhs).unwrap()
}
}
impl RemAssign for Decimal {
fn rem_assign(&mut self, rhs: Self) {
*self = self.checked_rem(&rhs).unwrap();
}
}