ape-table-trig-macros 0.2.0

proc macros for ape-table-trig
Documentation
  • Coverage
  • 66.67%
    2 out of 3 items documented0 out of 2 items with examples
  • Size
  • Source code size: 3.21 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 250.69 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 3s Average build duration of successful builds.
  • all releases: 3s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Gip-Gip/ape-table-trig
    5 1 1
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Gip-Gip

Ape Table Trigonometry

Implementations of sin, cos, and tan using precalculated tables.

Using these functions can significantly improve performance on systems with limited to no naitive floating point support, like the RP2040. Designed to be no_std compatible out of the box.

Example:

use ape_table_trig::*;

// Table has an accuracy down to 1πmrad
static TABLE: [f32; 1000] = trig_table_gen_f32!(1000);

fn main() {
    let table = TrigTableF32::new(&TABLE);

    // Calculate the sine of 1π radians
    let sine = table.sin(PI_F32);
}