impl<const SCALE: u32> crate::D<crate::int::types::Int<2>, SCALE> {
#[cfg(feature = "std")]
#[inline]
#[must_use]
pub fn sin_fast(self) -> Self {
Self::from_f64(self.to_f64().sin())
}
#[cfg(feature = "std")]
#[inline]
#[must_use]
pub fn cos_fast(self) -> Self {
Self::from_f64(self.to_f64().cos())
}
#[cfg(feature = "std")]
#[inline]
#[must_use]
pub fn tan_fast(self) -> Self {
Self::from_f64(self.to_f64().tan())
}
#[cfg(feature = "std")]
#[inline]
#[must_use]
pub fn asin_fast(self) -> Self {
Self::from_f64(self.to_f64().asin())
}
#[cfg(feature = "std")]
#[inline]
#[must_use]
pub fn acos_fast(self) -> Self {
Self::from_f64(self.to_f64().acos())
}
#[cfg(feature = "std")]
#[inline]
#[must_use]
pub fn atan_fast(self) -> Self {
Self::from_f64(self.to_f64().atan())
}
#[cfg(feature = "std")]
#[inline]
#[must_use]
pub fn atan2_fast(self, other: Self) -> Self {
Self::from_f64(self.to_f64().atan2(other.to_f64()))
}
#[cfg(feature = "std")]
#[inline]
#[must_use]
pub fn sinh_fast(self) -> Self {
Self::from_f64(self.to_f64().sinh())
}
#[cfg(feature = "std")]
#[inline]
#[must_use]
pub fn cosh_fast(self) -> Self {
Self::from_f64(self.to_f64().cosh())
}
#[cfg(feature = "std")]
#[inline]
#[must_use]
pub fn tanh_fast(self) -> Self {
Self::from_f64(self.to_f64().tanh())
}
#[cfg(feature = "std")]
#[inline]
#[must_use]
pub fn asinh_fast(self) -> Self {
Self::from_f64(self.to_f64().asinh())
}
#[cfg(feature = "std")]
#[inline]
#[must_use]
pub fn acosh_fast(self) -> Self {
Self::from_f64(self.to_f64().acosh())
}
#[cfg(feature = "std")]
#[inline]
#[must_use]
pub fn atanh_fast(self) -> Self {
Self::from_f64(self.to_f64().atanh())
}
#[cfg(feature = "std")]
#[inline]
#[must_use]
pub fn to_degrees_fast(self) -> Self {
Self::from_f64(self.to_f64().to_degrees())
}
#[cfg(feature = "std")]
#[inline]
#[must_use]
pub fn to_radians_fast(self) -> Self {
Self::from_f64(self.to_f64().to_radians())
}
}
#[cfg(all(feature = "std", any(not(feature = "strict"), feature = "fast")))]
impl<const SCALE: u32> crate::D<crate::int::types::Int<2>, SCALE> {
#[inline]
#[must_use]
pub fn sin(self) -> Self {
self.sin_fast()
}
#[inline]
#[must_use]
pub fn cos(self) -> Self {
self.cos_fast()
}
#[inline]
#[must_use]
pub fn tan(self) -> Self {
self.tan_fast()
}
#[inline]
#[must_use]
pub fn asin(self) -> Self {
self.asin_fast()
}
#[inline]
#[must_use]
pub fn acos(self) -> Self {
self.acos_fast()
}
#[inline]
#[must_use]
pub fn atan(self) -> Self {
self.atan_fast()
}
#[inline]
#[must_use]
pub fn atan2(self, other: Self) -> Self {
self.atan2_fast(other)
}
#[inline]
#[must_use]
pub fn sinh(self) -> Self {
self.sinh_fast()
}
#[inline]
#[must_use]
pub fn cosh(self) -> Self {
self.cosh_fast()
}
#[inline]
#[must_use]
pub fn tanh(self) -> Self {
self.tanh_fast()
}
#[inline]
#[must_use]
pub fn asinh(self) -> Self {
self.asinh_fast()
}
#[inline]
#[must_use]
pub fn acosh(self) -> Self {
self.acosh_fast()
}
#[inline]
#[must_use]
pub fn atanh(self) -> Self {
self.atanh_fast()
}
#[inline]
#[must_use]
pub fn to_degrees(self) -> Self {
self.to_degrees_fast()
}
#[inline]
#[must_use]
pub fn to_radians(self) -> Self {
self.to_radians_fast()
}
}