type_mel/
f32.rs

1/// Return the positive infinity for `f32`.
2#[mel_function]
3pub fn infinity() -> f32 {
4    f32::INFINITY
5}
6
7/// Return the negative infinity for `f32`.
8#[mel_function]
9pub fn neg_infinity() -> f32 {
10    f32::NEG_INFINITY
11}
12
13/// Return the not-a-number value for `f32`.
14#[mel_function]
15pub fn nan() -> f32 {
16    f32::NAN
17}
18
19use melodium_core::*;
20use melodium_macro::mel_function;
21
22/// Return the smallest value that can be represented by `f32`.
23///
24/// The smallest value for `f32` is `-340282350000000000000000000000000000000`.
25#[mel_function]
26pub fn min() -> f32 {
27    f32::MIN
28}
29
30/// Return the largest value that can be represented by `f32`.
31///
32/// The largest value for `f32` is `340282350000000000000000000000000000000`.
33#[mel_function]
34pub fn max() -> f32 {
35    f32::MAX
36}