… | |
… | |
10 | static bool network () { return e == 0x11223344; }; |
10 | static bool network () { return e == 0x11223344; }; |
11 | static bool little_endian () { return e == 0x44332211; }; |
11 | static bool little_endian () { return e == 0x44332211; }; |
12 | static bool vax () { return e == 0x44332211; }; |
12 | static bool vax () { return e == 0x44332211; }; |
13 | } byteorder; |
13 | } byteorder; |
14 | |
14 | |
|
|
15 | template<typename T, typename U> |
15 | template<typename T, typename U> static inline T min (T a, U b) { return a < b ? a : b; } |
16 | static inline T min (T a, U b) { return a < b ? a : (T)b; } |
|
|
17 | template<typename T, typename U> |
16 | template<typename T, typename U> static inline T max (T a, U b) { return a > b ? a : b; } |
18 | static inline T max (T a, U b) { return a > b ? a : (T)b; } |
17 | |
19 | |
18 | #include "simplevec.h" |
20 | #include "simplevec.h" |
19 | |
21 | |
20 | template<typename T> |
22 | template<typename T> |
21 | struct vector : simplevec<T> |
23 | struct vector : simplevec<T> |