jagua_rs/lib.rs
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
//!
//! A fast and fearless Collision Detection Engine for 2D irregular cutting and packing problems.
//!
//!
//! This crate can be configured to use single or double precision for floating points (see [fsize]).
/// Everything collision detection engine related
pub mod collision_detection;
/// Entities to model 2D irregular cutting and packing problems
pub mod entities;
/// Geometric primitives and base algorithms
pub mod geometry;
/// Parser and JSON (de)serialization
pub mod io;
/// Helper functions
pub mod util;
#[allow(non_camel_case_types)]
#[cfg(feature = "double-precision")]
/// The floating point type used in jagua-rs.
/// ```f32``` by default, ```f64``` when feature **double-precision** is enabled.
pub type fsize = f64;
#[cfg(feature = "double-precision")]
/// π as [fsize].
pub const PI: fsize = std::f64::consts::PI;
#[allow(non_camel_case_types)]
#[cfg(not(feature = "double-precision"))]
/// The floating point type used in jagua-rs.
/// ```f32``` by default, ```f64``` when feature **double-precision** is enabled.
pub type fsize = f32;
#[cfg(not(feature = "double-precision"))]
/// π as [fsize].
pub const PI: fsize = std::f32::consts::PI;