fixed-dsp 0.2.1

A Rust library for fixed-point digital signal processing (DSP) algorithms.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#![no_std]

pub mod basic;
pub mod common;
pub mod complex;
pub mod matrix;
pub mod statistics;
pub mod transform;

#[inline]
pub(crate) fn sat_i16(x: i32) -> i16 {
    x.clamp(i16::MIN as i32, i16::MAX as i32) as i16
}

#[inline]
pub(crate) fn sat_i32(x: i64) -> i32 {
    x.clamp(i32::MIN as i64, i32::MAX as i64) as i32
}