jay-compositor 1.15.0

The Jay compositor
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::utils::float_ext::FloatExt;

#[test]
fn test_f32() {
    let max = f32::MAX_SAFE_INT;
    assert_eq!(max as f32 as u64, max);
    assert_eq!((max - 1) as f32 as u64, max - 1);
    assert_ne!((max + 1) as f32 as u64, max + 1);
}

#[test]
fn test_f64() {
    let max = f64::MAX_SAFE_INT;
    assert_eq!(max as f64 as u64, max);
    assert_eq!((max - 1) as f64 as u64, max - 1);
    assert_ne!((max + 1) as f64 as u64, max + 1);
}