[−][src]Trait number_general::NumberInstance
Defines common operations on numeric types supported by Number
.
Associated Types
type Abs: NumberInstance
[src]
type Exp: NumberInstance
[src]
type Class: NumberClass<Instance = Self>
[src]
Required methods
pub fn class(&self) -> Self::Class
[src]
Get an impl of NumberClass
describing this number.
pub fn into_type(
self,
dtype: Self::Class
) -> <Self::Class as NumberClass>::Instance
[src]
self,
dtype: Self::Class
) -> <Self::Class as NumberClass>::Instance
Cast this number into the specified NumberClass
.
pub fn abs(self) -> Self::Abs
[src]
Calculate the absolute value of this number.
pub fn pow(self, exp: Self::Exp) -> Self
[src]
Raise this number to the given exponent.
Provided methods
pub fn and(self, other: Self) -> Self where
Boolean: CastFrom<Self>,
[src]
Boolean: CastFrom<Self>,
Return true
if self
and other
are nonzero.
pub fn not(self) -> Self where
Boolean: CastFrom<Self>,
[src]
Boolean: CastFrom<Self>,
Return true
if this number is zero.
pub fn or(self, other: Self) -> Self where
Boolean: CastFrom<Self>,
[src]
Boolean: CastFrom<Self>,
Return true
if self
or other
is nonzero.
pub fn xor(self, other: Self) -> Self where
Boolean: CastFrom<Self>,
[src]
Boolean: CastFrom<Self>,
Return true
if exactly one of self
and other
is zero.