Struct simplemad::MadFixed32
[−]
[src]
#[repr(C)]pub struct MadFixed32 { /* fields omitted */ }
libmad's native fixed-point sample format
A 32-bit value comprised of a sign bit, three whole number bits and 28 fractional bits.
Methods
impl MadFixed32
[src]
pub fn new(v: i32) -> MadFixed32
[src]
Construct a new MadFixed32 from a value in libmad's fixed-point format
pub fn to_raw(&self) -> i32
[src]
Get the raw fixed-point representation
pub fn to_i16(&self) -> i16
[src]
Convert to i16
pub fn to_i32(&self) -> i32
[src]
Convert to i32
pub fn to_f32(&self) -> f32
[src]
Convert to f32
pub fn to_f64(&self) -> f64
[src]
Convert to f64
Trait Implementations
impl Clone for MadFixed32
[src]
fn clone(&self) -> MadFixed32
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Copy for MadFixed32
[src]
impl Default for MadFixed32
[src]
fn default() -> MadFixed32
[src]
Returns the "default value" for a type. Read more
impl Debug for MadFixed32
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl From<i16> for MadFixed32
[src]
fn from(v: i16) -> MadFixed32
[src]
Performs the conversion.
impl From<i32> for MadFixed32
[src]
fn from(v: i32) -> MadFixed32
[src]
Performs the conversion.
impl From<f32> for MadFixed32
[src]
fn from(v: f32) -> MadFixed32
[src]
Performs the conversion.
impl From<f64> for MadFixed32
[src]
fn from(v: f64) -> MadFixed32
[src]
Performs the conversion.