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
40
41
42
43
44
45
46
47
48
49
50
51
//! Floating-point type configuration for conditional compilation
//!
//! This module defines a type alias that can be switched between `f32` and `f64`
//! using cargo features. Default is `f64`.
//!
//! # Features
//!
//! - `f64` (default): Use double-precision floating-point
//! - `f32`: Use single-precision floating-point
//!
//! # Example
//!
//! ```rust,ignore
//! use ta_core::types::Float;
//!
//! let x: Float = 1.0;
//! let y: Float = 2.0;
//! assert_eq!(x + y, 3.0);
//! ```
/// Floating-point type used throughout the library
///
/// When `f32` feature is enabled, this is `f32` (single-precision).
/// Otherwise, defaults to `f64` (double-precision).
pub type Float = f32;
/// Floating-point type used throughout the library
///
/// When `f32` feature is NOT enabled, this is `f64` (double-precision).
/// This is the default configuration.
pub type Float = f64;