Trait basic_dsp::TrigOps

source ·
pub trait TrigOps {
    // Required methods
    fn sin(&mut self);
    fn cos(&mut self);
    fn tan(&mut self);
    fn asin(&mut self);
    fn acos(&mut self);
    fn atan(&mut self);
    fn sinh(&mut self);
    fn cosh(&mut self);
    fn tanh(&mut self);
    fn asinh(&mut self);
    fn acosh(&mut self);
    fn atanh(&mut self);
}
Expand description

Trigonometry methods.

Required Methods§

source

fn sin(&mut self)

Calculates the sine of each element in radians.

§Example
use std::f32;
use basic_dsp_vector::*;
let mut vector = vec!(f32::consts::PI/2.0, -f32::consts::PI/2.0).to_real_time_vec();
vector.sin();
assert_eq!([1.0, -1.0], vector[..]);
source

fn cos(&mut self)

Calculates the cosine of each element in radians.

§Example
use std::f32;
use basic_dsp_vector::*;
let mut vector = vec!(2.0 * f32::consts::PI, f32::consts::PI).to_real_time_vec();
vector.cos();
assert_eq!([1.0, -1.0], vector[..]);
source

fn tan(&mut self)

Calculates the tangent of each element in radians.

source

fn asin(&mut self)

Calculates the principal value of the inverse sine of each element in radians.

source

fn acos(&mut self)

Calculates the principal value of the inverse cosine of each element in radians.

source

fn atan(&mut self)

Calculates the principal value of the inverse tangent of each element in radians.

source

fn sinh(&mut self)

Calculates the hyperbolic sine each element in radians.

source

fn cosh(&mut self)

Calculates the hyperbolic cosine each element in radians.

source

fn tanh(&mut self)

Calculates the hyperbolic tangent each element in radians.

source

fn asinh(&mut self)

Calculates the principal value of the inverse hyperbolic sine of each element in radians.

source

fn acosh(&mut self)

Calculates the principal value of the inverse hyperbolic cosine of each element in radians.

source

fn atanh(&mut self)

Calculates the principal value of the inverse hyperbolic tangent of each element in radians.

Implementors§

source§

impl<S, T, N, D> TrigOps for DspVec<S, T, N, D>
where S: ToSliceMut<T>, T: RealNumber, N: NumberSpace, D: Domain,

source§

impl<S, V, T> TrigOps for Matrix2xN<V, S, T>
where S: ToSlice<T>, V: Vector<T> + TrigOps, T: RealNumber,

source§

impl<S, V, T> TrigOps for Matrix3xN<V, S, T>
where S: ToSlice<T>, V: Vector<T> + TrigOps, T: RealNumber,

source§

impl<S, V, T> TrigOps for Matrix4xN<V, S, T>
where S: ToSlice<T>, V: Vector<T> + TrigOps, T: RealNumber,

source§

impl<S, V, T> TrigOps for MatrixMxN<V, S, T>
where S: ToSlice<T>, V: Vector<T> + TrigOps, T: RealNumber,