46 return (
u32)(x >> 32);
51 return (
u32)(x & 0xFFFFFFFF);
56 return (
u16)(x >> 16);
61 return (
u16)(x & 0xFFFF);
85 if(!(0.0 <= in && in < 1.0))
91 int l = (int)(in * 255.0);
92 ENSURE((
unsigned)l <= 255u);
99 if(!(0.0 <= in && in < 1.0))
105 long l = (long)(in * 65535.0);
106 ENSURE((
unsigned long)l <= 65535u);
u8 u8_from_double(double in)
convert double to u8; verifies number is in range.
u16 u32_lo(u32 x)
return upper 16-bits
u16 u16_from_double(double in)
convert double to u16; verifies number is in range.
u32 u64_lo(u64 x)
return upper 32-bits
u32 u32_from_u16(u16 hi, u16 lo)
assemble u64 from u32
u16 u32_hi(u32 x)
return lower 32-bits
#define ENSURE(expr)
ensure the expression <expr> evaluates to non-zero.
#define DEBUG_WARN_ERR(status)
display the error dialog with text corresponding to the given error code.
u64 u64_from_u32(u32 hi, u32 lo)
return lower 16-bits