| 1 | namespace glm |
| 2 | { |
| 3 | template<length_t L, typename T, qualifier Q> |
| 4 | GLM_FUNC_QUALIFIER vec<L, T, Q> nextFloat(vec<L, T, Q> const& x) |
| 5 | { |
| 6 | vec<L, T, Q> Result(0); |
| 7 | for(length_t i = 0, n = Result.length(); i < n; ++i) |
| 8 | Result[i] = nextFloat(x[i]); |
| 9 | return Result; |
| 10 | } |
| 11 | |
| 12 | template<length_t L, typename T, qualifier Q> |
| 13 | GLM_FUNC_QUALIFIER vec<L, T, Q> nextFloat(vec<L, T, Q> const& x, int ULPs) |
| 14 | { |
| 15 | vec<L, T, Q> Result(0); |
| 16 | for(length_t i = 0, n = Result.length(); i < n; ++i) |
| 17 | Result[i] = nextFloat(x[i], ULPs); |
| 18 | return Result; |
| 19 | } |
| 20 | |
| 21 | template<length_t L, typename T, qualifier Q> |
| 22 | GLM_FUNC_QUALIFIER vec<L, T, Q> nextFloat(vec<L, T, Q> const& x, vec<L, int, Q> const& ULPs) |
| 23 | { |
| 24 | vec<L, T, Q> Result(0); |
| 25 | for(length_t i = 0, n = Result.length(); i < n; ++i) |
| 26 | Result[i] = nextFloat(x[i], ULPs[i]); |
| 27 | return Result; |
| 28 | } |
| 29 | |
| 30 | template<length_t L, typename T, qualifier Q> |
| 31 | GLM_FUNC_QUALIFIER vec<L, T, Q> prevFloat(vec<L, T, Q> const& x) |
| 32 | { |
| 33 | vec<L, T, Q> Result(0); |
| 34 | for(length_t i = 0, n = Result.length(); i < n; ++i) |
| 35 | Result[i] = prevFloat(x[i]); |
| 36 | return Result; |
| 37 | } |
| 38 | |
| 39 | template<length_t L, typename T, qualifier Q> |
| 40 | GLM_FUNC_QUALIFIER vec<L, T, Q> prevFloat(vec<L, T, Q> const& x, int ULPs) |
| 41 | { |
| 42 | vec<L, T, Q> Result(0); |
| 43 | for(length_t i = 0, n = Result.length(); i < n; ++i) |
| 44 | Result[i] = prevFloat(x[i], ULPs); |
| 45 | return Result; |
| 46 | } |
| 47 | |
| 48 | template<length_t L, typename T, qualifier Q> |
| 49 | GLM_FUNC_QUALIFIER vec<L, T, Q> prevFloat(vec<L, T, Q> const& x, vec<L, int, Q> const& ULPs) |
| 50 | { |
| 51 | vec<L, T, Q> Result(0); |
| 52 | for(length_t i = 0, n = Result.length(); i < n; ++i) |
| 53 | Result[i] = prevFloat(x[i], ULPs[i]); |
| 54 | return Result; |
| 55 | } |
| 56 | |
| 57 | template<length_t L, qualifier Q> |
| 58 | GLM_FUNC_QUALIFIER vec<L, int, Q> floatDistance(vec<L, float, Q> const& x, vec<L, float, Q> const& y) |
| 59 | { |
| 60 | vec<L, int, Q> Result(0); |
| 61 | for(length_t i = 0, n = Result.length(); i < n; ++i) |
| 62 | Result[i] = floatDistance(x[i], y[i]); |
| 63 | return Result; |
| 64 | } |
| 65 | |
| 66 | template<length_t L, qualifier Q> |
| 67 | GLM_FUNC_QUALIFIER vec<L, int64, Q> floatDistance(vec<L, double, Q> const& x, vec<L, double, Q> const& y) |
| 68 | { |
| 69 | vec<L, int64, Q> Result(0); |
| 70 | for(length_t i = 0, n = Result.length(); i < n; ++i) |
| 71 | Result[i] = floatDistance(x[i], y[i]); |
| 72 | return Result; |
| 73 | } |
| 74 | }//namespace glm |