std_mel/types/
mod.rs

1use melodium_macro::mel_function;
2
3pub mod char;
4pub mod float;
5
6/// Return the smallest value that can be represented by the type.
7#[mel_function(
8    generic B (Bounded)
9)]
10pub fn min() -> B {
11    let b = generics.get("B").unwrap();
12
13    b.bounded_min()
14}
15
16/// Return the highest value that can be represented by the type.
17#[mel_function(
18    generic B (Bounded)
19)]
20pub fn max() -> B {
21    let b = generics.get("B").unwrap();
22
23    b.bounded_max()
24}