GCC Code Coverage Report


Directory: ./
File: openvdb/openvdb/math/Vec4.h
Date: 2022-07-25 17:40:05
Exec Total Coverage
Lines: 51 73 69.9%
Functions: 4 8 50.0%
Branches: 285 1670 17.1%

Line Branch Exec Source
1 // Copyright Contributors to the OpenVDB Project
2 // SPDX-License-Identifier: MPL-2.0
3
4 #ifndef OPENVDB_MATH_VEC4_HAS_BEEN_INCLUDED
5 #define OPENVDB_MATH_VEC4_HAS_BEEN_INCLUDED
6
7 #include <openvdb/Exceptions.h>
8 #include "Math.h"
9 #include "Tuple.h"
10 #include "Vec3.h"
11 #include <algorithm>
12 #include <cmath>
13 #include <type_traits>
14
15
16 namespace openvdb {
17 OPENVDB_USE_VERSION_NAMESPACE
18 namespace OPENVDB_VERSION_NAME {
19 namespace math {
20
21 template<typename T> class Mat3;
22
23 template<typename T>
24 class Vec4: public Tuple<4, T>
25 {
26 public:
27 using value_type = T;
28 using ValueType = T;
29
30 /// Trivial constructor, the vector is NOT initialized
31 #if OPENVDB_ABI_VERSION_NUMBER >= 8
32 /// @note destructor, copy constructor, assignment operator and
33 /// move constructor are left to be defined by the compiler (default)
34 Vec4() = default;
35 #else
36 Vec4() {}
37 #endif
38
39 /// @brief Construct a vector all of whose components have the given value.
40
3/36
✓ Branch 0 taken 1 times.
✗ Branch 1 not taken.
✗ Branch 2 not taken.
✓ Branch 3 taken 1 times.
✗ Branch 4 not taken.
✗ Branch 5 not taken.
✗ Branch 7 not taken.
✗ Branch 8 not taken.
✗ Branch 10 not taken.
✗ Branch 11 not taken.
✗ Branch 13 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 25 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
✗ Branch 29 not taken.
✗ Branch 30 not taken.
✗ Branch 31 not taken.
✗ Branch 33 not taken.
✗ Branch 34 not taken.
✗ Branch 35 not taken.
✗ Branch 36 not taken.
✓ Branch 37 taken 114 times.
✗ Branch 38 not taken.
✗ Branch 39 not taken.
✗ Branch 40 not taken.
✗ Branch 41 not taken.
857511 explicit Vec4(T val) { this->mm[0] = this->mm[1] = this->mm[2] = this->mm[3] = val; }
41
42 /// Constructor with four arguments, e.g. Vec4f v(1,2,3,4);
43 2747 Vec4(T x, T y, T z, T w)
44 {
45 2747 this->mm[0] = x;
46 2747 this->mm[1] = y;
47 2747 this->mm[2] = z;
48
38/75
✗ Branch 0 not taken.
✓ Branch 1 taken 12 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 270 times.
✓ Branch 5 taken 478 times.
✓ Branch 6 taken 664 times.
✓ Branch 7 taken 862 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 8 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 8 times.
✗ Branch 14 not taken.
✓ Branch 16 taken 8 times.
✗ Branch 17 not taken.
✓ Branch 19 taken 3 times.
✗ Branch 20 not taken.
✓ Branch 22 taken 4 times.
✗ Branch 23 not taken.
✓ Branch 25 taken 4 times.
✗ Branch 26 not taken.
✓ Branch 28 taken 4 times.
✗ Branch 29 not taken.
✓ Branch 31 taken 3 times.
✗ Branch 32 not taken.
✓ Branch 34 taken 3 times.
✗ Branch 35 not taken.
✓ Branch 37 taken 2 times.
✗ Branch 38 not taken.
✓ Branch 40 taken 2 times.
✗ Branch 41 not taken.
✓ Branch 43 taken 2 times.
✗ Branch 44 not taken.
✓ Branch 46 taken 1 times.
✗ Branch 47 not taken.
✓ Branch 49 taken 1 times.
✗ Branch 50 not taken.
✓ Branch 52 taken 1 times.
✗ Branch 53 not taken.
✓ Branch 55 taken 10 times.
✗ Branch 56 not taken.
✓ Branch 58 taken 10 times.
✗ Branch 59 not taken.
✓ Branch 61 taken 10 times.
✗ Branch 62 not taken.
✓ Branch 64 taken 10 times.
✗ Branch 65 not taken.
✓ Branch 67 taken 10 times.
✗ Branch 68 not taken.
✓ Branch 70 taken 10 times.
✗ Branch 71 not taken.
✓ Branch 73 taken 3 times.
✗ Branch 74 not taken.
✓ Branch 76 taken 3 times.
✗ Branch 77 not taken.
✓ Branch 79 taken 3 times.
✗ Branch 80 not taken.
✓ Branch 82 taken 3 times.
✗ Branch 83 not taken.
✓ Branch 85 taken 3 times.
✗ Branch 86 not taken.
✓ Branch 88 taken 2 times.
✗ Branch 89 not taken.
✓ Branch 91 taken 2 times.
✗ Branch 92 not taken.
✓ Branch 94 taken 2 times.
✗ Branch 95 not taken.
✓ Branch 97 taken 2 times.
✗ Branch 98 not taken.
✓ Branch 100 taken 2 times.
✗ Branch 101 not taken.
✓ Branch 103 taken 2 times.
✗ Branch 104 not taken.
✓ Branch 106 taken 2 times.
✗ Branch 107 not taken.
2692 this->mm[3] = w;
49 }
50
51 /// Constructor with array argument, e.g. float a[4]; Vec4f v(a);
52 template <typename Source>
53 Vec4(Source *a)
54 {
55 this->mm[0] = static_cast<T>(a[0]);
56 this->mm[1] = static_cast<T>(a[1]);
57 this->mm[2] = static_cast<T>(a[2]);
58 this->mm[3] = static_cast<T>(a[3]);
59 }
60
61 /// Conversion constructor
62 template<typename Source>
63 explicit Vec4(const Tuple<4, Source> &v)
64 {
65 14 this->mm[0] = static_cast<T>(v[0]);
66 14 this->mm[1] = static_cast<T>(v[1]);
67 14 this->mm[2] = static_cast<T>(v[2]);
68 14 this->mm[3] = static_cast<T>(v[3]);
69 }
70
71 /// @brief Construct a vector all of whose components have the given value,
72 /// which may be of an arithmetic type different from this vector's value type.
73 /// @details Type conversion warnings are suppressed.
74 template<typename Other>
75 2357794 explicit Vec4(Other val,
76 typename std::enable_if<std::is_arithmetic<Other>::value, Conversion>::type = Conversion{})
77 {
78
17/77
✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 times.
✓ Branch 5 taken 3 times.
✗ Branch 6 not taken.
✓ Branch 7 taken 1 times.
✓ Branch 8 taken 2 times.
✗ Branch 9 not taken.
✓ Branch 10 taken 1 times.
✓ Branch 11 taken 2 times.
✗ Branch 12 not taken.
✓ Branch 13 taken 1 times.
✓ Branch 14 taken 2 times.
✗ Branch 15 not taken.
✓ Branch 16 taken 1 times.
✓ Branch 17 taken 1 times.
✗ Branch 18 not taken.
✓ Branch 19 taken 1 times.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
✓ Branch 22 taken 1 times.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 25 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
✗ Branch 28 not taken.
✗ Branch 29 not taken.
✗ Branch 30 not taken.
✗ Branch 31 not taken.
✗ Branch 32 not taken.
✗ Branch 33 not taken.
✗ Branch 34 not taken.
✗ Branch 35 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
✗ Branch 38 not taken.
✗ Branch 39 not taken.
✗ Branch 40 not taken.
✗ Branch 41 not taken.
✓ Branch 43 taken 1 times.
✗ Branch 44 not taken.
✗ Branch 45 not taken.
✓ Branch 48 taken 1 times.
✗ Branch 49 not taken.
✗ Branch 50 not taken.
✗ Branch 51 not taken.
✗ Branch 52 not taken.
✗ Branch 53 not taken.
✗ Branch 54 not taken.
✗ Branch 55 not taken.
✗ Branch 58 not taken.
✗ Branch 59 not taken.
✗ Branch 61 not taken.
✗ Branch 62 not taken.
✗ Branch 63 not taken.
✗ Branch 64 not taken.
✗ Branch 66 not taken.
✗ Branch 67 not taken.
✗ Branch 69 not taken.
✗ Branch 70 not taken.
✗ Branch 71 not taken.
✗ Branch 73 not taken.
✗ Branch 74 not taken.
✗ Branch 76 not taken.
✓ Branch 77 taken 112 times.
✗ Branch 78 not taken.
✗ Branch 79 not taken.
✗ Branch 80 not taken.
✗ Branch 81 not taken.
✗ Branch 82 not taken.
✓ Branch 83 taken 114 times.
✗ Branch 84 not taken.
✗ Branch 86 not taken.
✗ Branch 87 not taken.
✗ Branch 88 not taken.
2357436 this->mm[0] = this->mm[1] = this->mm[2] = this->mm[3] = static_cast<T>(val);
79 }
80
81 /// Reference to the component, e.g. v.x() = 4.5f;
82 T& x() { return this->mm[0]; }
83 T& y() { return this->mm[1]; }
84 T& z() { return this->mm[2]; }
85 T& w() { return this->mm[3]; }
86
87 /// Get the component, e.g. float f = v.y();
88 T x() const { return this->mm[0]; }
89 T y() const { return this->mm[1]; }
90 T z() const { return this->mm[2]; }
91 T w() const { return this->mm[3]; }
92
93 853 T* asPointer() { return this->mm; }
94 const T* asPointer() const { return this->mm; }
95
96 /// Alternative indexed reference to the elements
97 T& operator()(int i) { return this->mm[i]; }
98
99 /// Alternative indexed constant reference to the elements,
100 T operator()(int i) const { return this->mm[i]; }
101
102 /// Returns a Vec3 with the first three elements of the Vec4.
103 Vec3<T> getVec3() const { return Vec3<T>(this->mm[0], this->mm[1], this->mm[2]); }
104
105 /// "this" vector gets initialized to [x, y, z, w],
106 /// calling v.init(); has same effect as calling v = Vec4::zero();
107 const Vec4<T>& init(T x=0, T y=0, T z=0, T w=0)
108 {
109 this->mm[0] = x; this->mm[1] = y; this->mm[2] = z; this->mm[3] = w;
110 return *this;
111 }
112
113 /// Set "this" vector to zero
114 const Vec4<T>& setZero()
115 {
116 this->mm[0] = 0; this->mm[1] = 0; this->mm[2] = 0; this->mm[3] = 0;
117 return *this;
118 }
119
120 /// Assignment operator
121 template<typename Source>
122 const Vec4<T>& operator=(const Vec4<Source> &v)
123 {
124 // note: don't static_cast because that suppresses warnings
125 this->mm[0] = v[0];
126 this->mm[1] = v[1];
127 this->mm[2] = v[2];
128 this->mm[3] = v[3];
129
130 return *this;
131 }
132
133 /// Test if "this" vector is equivalent to vector v with tolerance
134 /// of eps
135 bool eq(const Vec4<T> &v, T eps = static_cast<T>(1.0e-8)) const
136 {
137 return isApproxEqual(this->mm[0], v.mm[0], eps) &&
138 isApproxEqual(this->mm[1], v.mm[1], eps) &&
139 isApproxEqual(this->mm[2], v.mm[2], eps) &&
140 isApproxEqual(this->mm[3], v.mm[3], eps);
141 }
142
143 /// Negation operator, for e.g. v1 = -v2;
144 Vec4<T> operator-() const
145 {
146 return Vec4<T>(
147 -this->mm[0],
148 -this->mm[1],
149 -this->mm[2],
150 -this->mm[3]);
151 }
152
153 /// this = v1 + v2
154 /// "this", v1 and v2 need not be distinct objects, e.g. v.add(v1,v);
155 template <typename T0, typename T1>
156 const Vec4<T>& add(const Vec4<T0> &v1, const Vec4<T1> &v2)
157 {
158 this->mm[0] = v1[0] + v2[0];
159 this->mm[1] = v1[1] + v2[1];
160 this->mm[2] = v1[2] + v2[2];
161 this->mm[3] = v1[3] + v2[3];
162
163 return *this;
164 }
165
166
167 /// this = v1 - v2
168 /// "this", v1 and v2 need not be distinct objects, e.g. v.sub(v1,v);
169 template <typename T0, typename T1>
170 const Vec4<T>& sub(const Vec4<T0> &v1, const Vec4<T1> &v2)
171 {
172 this->mm[0] = v1[0] - v2[0];
173 this->mm[1] = v1[1] - v2[1];
174 this->mm[2] = v1[2] - v2[2];
175 this->mm[3] = v1[3] - v2[3];
176
177 return *this;
178 }
179
180 /// this = scalar*v, v need not be a distinct object from "this",
181 /// e.g. v.scale(1.5,v1);
182 template <typename T0, typename T1>
183 const Vec4<T>& scale(T0 scale, const Vec4<T1> &v)
184 {
185 this->mm[0] = scale * v[0];
186 this->mm[1] = scale * v[1];
187 this->mm[2] = scale * v[2];
188 this->mm[3] = scale * v[3];
189
190 return *this;
191 }
192
193 template <typename T0, typename T1>
194 const Vec4<T> &div(T0 scalar, const Vec4<T1> &v)
195 {
196 this->mm[0] = v[0] / scalar;
197 this->mm[1] = v[1] / scalar;
198 this->mm[2] = v[2] / scalar;
199 this->mm[3] = v[3] / scalar;
200
201 return *this;
202 }
203
204 /// Dot product
205 T dot(const Vec4<T> &v) const
206 {
207 return (this->mm[0]*v.mm[0] + this->mm[1]*v.mm[1]
208 + this->mm[2]*v.mm[2] + this->mm[3]*v.mm[3]);
209 }
210
211 /// Length of the vector
212 358 T length() const
213 {
214 358 return std::sqrt(
215 358 this->mm[0]*this->mm[0] +
216 358 this->mm[1]*this->mm[1] +
217 358 this->mm[2]*this->mm[2] +
218 358 this->mm[3]*this->mm[3]);
219 }
220
221
222 /// Squared length of the vector, much faster than length() as it
223 /// does not involve square root
224 T lengthSqr() const
225 {
226 246 return (this->mm[0]*this->mm[0] + this->mm[1]*this->mm[1]
227 246 + this->mm[2]*this->mm[2] + this->mm[3]*this->mm[3]);
228 }
229
230 /// Return a reference to itself after the exponent has been
231 /// applied to all the vector components.
232 inline const Vec4<T>& exp()
233 {
234 this->mm[0] = std::exp(this->mm[0]);
235 this->mm[1] = std::exp(this->mm[1]);
236 this->mm[2] = std::exp(this->mm[2]);
237 this->mm[3] = std::exp(this->mm[3]);
238 return *this;
239 }
240
241 /// Return a reference to itself after log has been
242 /// applied to all the vector components.
243 inline const Vec4<T>& log()
244 {
245 this->mm[0] = std::log(this->mm[0]);
246 this->mm[1] = std::log(this->mm[1]);
247 this->mm[2] = std::log(this->mm[2]);
248 this->mm[3] = std::log(this->mm[3]);
249 return *this;
250 }
251
252 /// Return the sum of all the vector components.
253 inline T sum() const
254 {
255 return this->mm[0] + this->mm[1] + this->mm[2] + this->mm[3];
256 }
257
258 /// Return the product of all the vector components.
259 inline T product() const
260 {
261 return this->mm[0] * this->mm[1] * this->mm[2] * this->mm[3];
262 }
263
264 /// this = normalized this
265 354 bool normalize(T eps = static_cast<T>(1.0e-8))
266 {
267 354 T d = length();
268
1/2
✓ Branch 0 taken 177 times.
✗ Branch 1 not taken.
354 if (isApproxEqual(d, T(0), eps)) {
269 return false;
270 }
271 354 *this *= (T(1) / d);
272 354 return true;
273 }
274
275 /// return normalized this, throws if null vector
276 Vec4<T> unit(T eps=0) const
277 {
278 T d;
279 return unit(eps, d);
280 }
281
282 /// return normalized this and length, throws if null vector
283 Vec4<T> unit(T eps, T& len) const
284 {
285 len = length();
286 if (isApproxEqual(len, T(0), eps)) {
287 throw ArithmeticError("Normalizing null 4-vector");
288 }
289 return *this / len;
290 }
291
292 /// return normalized this, or (1, 0, 0, 0) if this is null vector
293 Vec4<T> unitSafe() const
294 {
295 T l2 = lengthSqr();
296 return l2 ? *this / static_cast<T>(sqrt(l2)) : Vec4<T>(1, 0, 0, 0);
297 }
298
299 /// Multiply each element of this vector by @a scalar.
300 template <typename S>
301 const Vec4<T> &operator*=(S scalar)
302 {
303 191 this->mm[0] *= scalar;
304 191 this->mm[1] *= scalar;
305 191 this->mm[2] *= scalar;
306 191 this->mm[3] *= scalar;
307 return *this;
308 }
309
310 /// Multiply each element of this vector by the corresponding element of the given vector.
311 template <typename S>
312 const Vec4<T> &operator*=(const Vec4<S> &v1)
313 {
314 this->mm[0] *= v1[0];
315 this->mm[1] *= v1[1];
316 this->mm[2] *= v1[2];
317 this->mm[3] *= v1[3];
318
319 return *this;
320 }
321
322 /// Divide each element of this vector by @a scalar.
323 template <typename S>
324 const Vec4<T> &operator/=(S scalar)
325 {
326 this->mm[0] /= scalar;
327 this->mm[1] /= scalar;
328 this->mm[2] /= scalar;
329 this->mm[3] /= scalar;
330 return *this;
331 }
332
333 /// Divide each element of this vector by the corresponding element of the given vector.
334 template <typename S>
335 const Vec4<T> &operator/=(const Vec4<S> &v1)
336 {
337 this->mm[0] /= v1[0];
338 this->mm[1] /= v1[1];
339 this->mm[2] /= v1[2];
340 this->mm[3] /= v1[3];
341 return *this;
342 }
343
344 /// Add @a scalar to each element of this vector.
345 template <typename S>
346 const Vec4<T> &operator+=(S scalar)
347 {
348 this->mm[0] += scalar;
349 this->mm[1] += scalar;
350 this->mm[2] += scalar;
351 this->mm[3] += scalar;
352 return *this;
353 }
354
355 /// Add each element of the given vector to the corresponding element of this vector.
356 template <typename S>
357 const Vec4<T> &operator+=(const Vec4<S> &v1)
358 {
359 18 this->mm[0] += v1[0];
360 18 this->mm[1] += v1[1];
361 18 this->mm[2] += v1[2];
362
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
15 this->mm[3] += v1[3];
363 return *this;
364 }
365
366 /// Subtract @a scalar from each element of this vector.
367 template <typename S>
368 const Vec4<T> &operator-=(S scalar)
369 {
370 this->mm[0] -= scalar;
371 this->mm[1] -= scalar;
372 this->mm[2] -= scalar;
373 this->mm[3] -= scalar;
374 return *this;
375 }
376
377 /// Subtract each element of the given vector from the corresponding element of this vector.
378 template <typename S>
379 const Vec4<T> &operator-=(const Vec4<S> &v1)
380 {
381 16 this->mm[0] -= v1[0];
382 16 this->mm[1] -= v1[1];
383 16 this->mm[2] -= v1[2];
384
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
15 this->mm[3] -= v1[3];
385 return *this;
386 }
387
388 // Number of cols, rows, elements
389 static unsigned numRows() { return 1; }
390 static unsigned numColumns() { return 4; }
391 static unsigned numElements() { return 4; }
392
393 /// Predefined constants, e.g. Vec4f v = Vec4f::xNegAxis();
394 static Vec4<T> zero() { return Vec4<T>(0, 0, 0, 0); }
395 static Vec4<T> origin() { return Vec4<T>(0, 0, 0, 1); }
396 static Vec4<T> ones() { return Vec4<T>(1, 1, 1, 1); }
397 };
398
399 /// Equality operator, does exact floating point comparisons
400 template <typename T0, typename T1>
401 inline bool operator==(const Vec4<T0> &v0, const Vec4<T1> &v1)
402 {
403 return
404
56/356
✓ Branch 0 taken 184 times.
✗ Branch 1 not taken.
✓ Branch 2 taken 12 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 663618 times.
✓ Branch 5 taken 1 times.
✓ Branch 6 taken 8 times.
✗ Branch 7 not taken.
✓ Branch 8 taken 64 times.
✗ Branch 9 not taken.
✓ Branch 10 taken 8 times.
✗ Branch 11 not taken.
✓ Branch 12 taken 64 times.
✗ Branch 13 not taken.
✓ Branch 14 taken 8 times.
✗ Branch 15 not taken.
✓ Branch 16 taken 64 times.
✗ Branch 17 not taken.
✓ Branch 18 taken 8 times.
✗ Branch 19 not taken.
✓ Branch 20 taken 64 times.
✗ Branch 21 not taken.
✓ Branch 22 taken 8 times.
✗ Branch 23 not taken.
✓ Branch 24 taken 64 times.
✗ Branch 25 not taken.
✓ Branch 26 taken 8 times.
✗ Branch 27 not taken.
✓ Branch 28 taken 120 times.
✗ Branch 29 not taken.
✓ Branch 30 taken 16 times.
✗ Branch 31 not taken.
✓ Branch 32 taken 64 times.
✗ Branch 33 not taken.
✓ Branch 34 taken 4 times.
✗ Branch 35 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
✗ Branch 38 not taken.
✗ Branch 39 not taken.
✗ Branch 40 not taken.
✗ Branch 41 not taken.
✗ Branch 42 not taken.
✗ Branch 43 not taken.
✗ Branch 44 not taken.
✗ Branch 45 not taken.
✗ Branch 46 not taken.
✗ Branch 47 not taken.
✗ Branch 48 not taken.
✗ Branch 49 not taken.
✗ Branch 50 not taken.
✗ Branch 51 not taken.
✗ Branch 52 not taken.
✗ Branch 53 not taken.
✗ Branch 54 not taken.
✗ Branch 55 not taken.
✗ Branch 56 not taken.
✗ Branch 57 not taken.
✗ Branch 58 not taken.
✗ Branch 59 not taken.
✗ Branch 60 not taken.
✗ Branch 61 not taken.
✗ Branch 62 not taken.
✗ Branch 63 not taken.
✗ Branch 64 not taken.
✗ Branch 65 not taken.
✗ Branch 66 not taken.
✗ Branch 67 not taken.
✗ Branch 68 not taken.
✗ Branch 69 not taken.
✗ Branch 70 not taken.
✗ Branch 71 not taken.
✗ Branch 72 not taken.
✗ Branch 73 not taken.
✗ Branch 74 not taken.
✗ Branch 75 not taken.
✓ Branch 76 taken 2 times.
✗ Branch 77 not taken.
✓ Branch 78 taken 1 times.
✗ Branch 79 not taken.
✗ Branch 80 not taken.
✗ Branch 81 not taken.
✗ Branch 82 not taken.
✗ Branch 83 not taken.
✗ Branch 84 not taken.
✗ Branch 85 not taken.
✗ Branch 86 not taken.
✗ Branch 87 not taken.
✗ Branch 88 not taken.
✗ Branch 89 not taken.
✗ Branch 90 not taken.
✗ Branch 91 not taken.
✗ Branch 92 not taken.
✗ Branch 93 not taken.
✗ Branch 94 not taken.
✗ Branch 95 not taken.
✗ Branch 96 not taken.
✗ Branch 97 not taken.
✗ Branch 98 not taken.
✗ Branch 99 not taken.
✗ Branch 100 not taken.
✗ Branch 101 not taken.
✗ Branch 102 not taken.
✗ Branch 103 not taken.
✗ Branch 104 not taken.
✗ Branch 105 not taken.
✗ Branch 106 not taken.
✗ Branch 107 not taken.
✗ Branch 108 not taken.
✗ Branch 109 not taken.
✗ Branch 110 not taken.
✗ Branch 111 not taken.
✗ Branch 112 not taken.
✗ Branch 113 not taken.
✗ Branch 114 not taken.
✗ Branch 115 not taken.
✗ Branch 116 not taken.
✗ Branch 117 not taken.
✗ Branch 118 not taken.
✗ Branch 119 not taken.
✗ Branch 120 not taken.
✗ Branch 121 not taken.
✗ Branch 122 not taken.
✗ Branch 123 not taken.
✗ Branch 124 not taken.
✗ Branch 125 not taken.
✗ Branch 126 not taken.
✗ Branch 127 not taken.
✗ Branch 128 not taken.
✗ Branch 129 not taken.
✗ Branch 130 not taken.
✗ Branch 131 not taken.
✗ Branch 132 not taken.
✗ Branch 133 not taken.
✗ Branch 134 not taken.
✗ Branch 135 not taken.
✗ Branch 136 not taken.
✗ Branch 137 not taken.
✗ Branch 138 not taken.
✗ Branch 139 not taken.
✗ Branch 140 not taken.
✗ Branch 141 not taken.
✗ Branch 142 not taken.
✗ Branch 143 not taken.
✗ Branch 144 not taken.
✗ Branch 145 not taken.
✗ Branch 146 not taken.
✗ Branch 147 not taken.
✗ Branch 148 not taken.
✗ Branch 149 not taken.
✗ Branch 150 not taken.
✗ Branch 151 not taken.
✗ Branch 152 not taken.
✗ Branch 153 not taken.
✗ Branch 154 not taken.
✗ Branch 155 not taken.
✗ Branch 156 not taken.
✗ Branch 157 not taken.
✗ Branch 158 not taken.
✗ Branch 159 not taken.
✗ Branch 160 not taken.
✗ Branch 161 not taken.
✗ Branch 162 not taken.
✗ Branch 163 not taken.
✗ Branch 164 not taken.
✗ Branch 165 not taken.
✗ Branch 166 not taken.
✗ Branch 167 not taken.
✗ Branch 168 not taken.
✗ Branch 169 not taken.
✗ Branch 170 not taken.
✗ Branch 171 not taken.
✗ Branch 172 not taken.
✗ Branch 173 not taken.
✗ Branch 174 not taken.
✗ Branch 175 not taken.
✗ Branch 176 not taken.
✗ Branch 177 not taken.
✗ Branch 178 not taken.
✗ Branch 179 not taken.
✗ Branch 180 not taken.
✗ Branch 181 not taken.
✗ Branch 182 not taken.
✗ Branch 183 not taken.
✗ Branch 184 not taken.
✗ Branch 185 not taken.
✗ Branch 186 not taken.
✗ Branch 187 not taken.
✗ Branch 188 not taken.
✗ Branch 189 not taken.
✗ Branch 190 not taken.
✗ Branch 191 not taken.
✗ Branch 192 not taken.
✗ Branch 193 not taken.
✗ Branch 194 not taken.
✗ Branch 195 not taken.
✗ Branch 196 not taken.
✗ Branch 197 not taken.
✓ Branch 198 taken 92 times.
✓ Branch 199 taken 12 times.
✓ Branch 200 taken 88 times.
✓ Branch 201 taken 4 times.
✓ Branch 202 taken 90 times.
✓ Branch 203 taken 4 times.
✗ Branch 204 not taken.
✗ Branch 205 not taken.
✗ Branch 206 not taken.
✗ Branch 207 not taken.
✗ Branch 208 not taken.
✗ Branch 209 not taken.
✗ Branch 210 not taken.
✗ Branch 211 not taken.
✗ Branch 212 not taken.
✗ Branch 213 not taken.
✗ Branch 214 not taken.
✗ Branch 215 not taken.
✗ Branch 216 not taken.
✗ Branch 217 not taken.
✗ Branch 218 not taken.
✗ Branch 219 not taken.
✗ Branch 220 not taken.
✗ Branch 221 not taken.
✗ Branch 222 not taken.
✗ Branch 223 not taken.
✓ Branch 224 taken 4684014 times.
✗ Branch 225 not taken.
✓ Branch 226 taken 4684014 times.
✗ Branch 227 not taken.
✓ Branch 228 taken 4684014 times.
✗ Branch 229 not taken.
✓ Branch 230 taken 4684014 times.
✗ Branch 231 not taken.
✓ Branch 232 taken 36882 times.
✗ Branch 233 not taken.
✓ Branch 234 taken 36882 times.
✗ Branch 235 not taken.
✓ Branch 236 taken 36882 times.
✗ Branch 237 not taken.
✗ Branch 238 not taken.
✗ Branch 239 not taken.
✗ Branch 240 not taken.
✗ Branch 241 not taken.
✗ Branch 242 not taken.
✗ Branch 243 not taken.
✗ Branch 244 not taken.
✗ Branch 245 not taken.
✗ Branch 246 not taken.
✗ Branch 247 not taken.
✗ Branch 248 not taken.
✗ Branch 249 not taken.
✗ Branch 250 not taken.
✗ Branch 251 not taken.
✓ Branch 252 taken 4684014 times.
✗ Branch 253 not taken.
✓ Branch 254 taken 4684014 times.
✗ Branch 255 not taken.
✓ Branch 256 taken 4684014 times.
✗ Branch 257 not taken.
✓ Branch 258 taken 4684014 times.
✗ Branch 259 not taken.
✓ Branch 260 taken 36882 times.
✗ Branch 261 not taken.
✓ Branch 262 taken 36882 times.
✗ Branch 263 not taken.
✓ Branch 264 taken 36882 times.
✗ Branch 265 not taken.
✗ Branch 266 not taken.
✗ Branch 267 not taken.
✗ Branch 268 not taken.
✗ Branch 269 not taken.
✗ Branch 270 not taken.
✗ Branch 271 not taken.
✗ Branch 272 not taken.
✗ Branch 273 not taken.
✗ Branch 274 not taken.
✗ Branch 275 not taken.
✗ Branch 276 not taken.
✗ Branch 277 not taken.
✗ Branch 278 not taken.
✗ Branch 279 not taken.
✗ Branch 280 not taken.
✗ Branch 281 not taken.
✗ Branch 282 not taken.
✗ Branch 283 not taken.
✓ Branch 284 taken 4684014 times.
✗ Branch 285 not taken.
✓ Branch 286 taken 4684014 times.
✗ Branch 287 not taken.
✓ Branch 288 taken 4684014 times.
✗ Branch 289 not taken.
✓ Branch 290 taken 4684014 times.
✗ Branch 291 not taken.
✓ Branch 292 taken 36882 times.
✗ Branch 293 not taken.
✓ Branch 294 taken 36882 times.
✗ Branch 295 not taken.
✓ Branch 296 taken 36882 times.
✗ Branch 297 not taken.
✗ Branch 298 not taken.
✗ Branch 299 not taken.
✗ Branch 300 not taken.
✗ Branch 301 not taken.
✗ Branch 302 not taken.
✗ Branch 303 not taken.
✓ Branch 304 taken 4098 times.
✓ Branch 305 taken 4098 times.
✓ Branch 306 taken 1 times.
✓ Branch 307 taken 1 times.
✗ Branch 308 not taken.
✗ Branch 309 not taken.
✗ Branch 310 not taken.
✗ Branch 311 not taken.
✗ Branch 312 not taken.
✗ Branch 313 not taken.
✗ Branch 314 not taken.
✗ Branch 315 not taken.
✓ Branch 316 taken 4098 times.
✗ Branch 317 not taken.
✓ Branch 318 taken 1 times.
✗ Branch 319 not taken.
✗ Branch 320 not taken.
✗ Branch 321 not taken.
✗ Branch 322 not taken.
✗ Branch 323 not taken.
✗ Branch 324 not taken.
✗ Branch 325 not taken.
✓ Branch 326 taken 4098 times.
✗ Branch 327 not taken.
✓ Branch 328 taken 1 times.
✗ Branch 329 not taken.
✗ Branch 330 not taken.
✗ Branch 331 not taken.
✗ Branch 332 not taken.
✗ Branch 333 not taken.
✗ Branch 334 not taken.
✗ Branch 335 not taken.
✗ Branch 336 not taken.
✗ Branch 337 not taken.
✗ Branch 338 not taken.
✗ Branch 339 not taken.
✗ Branch 340 not taken.
✗ Branch 341 not taken.
✗ Branch 342 not taken.
✗ Branch 343 not taken.
✗ Branch 344 not taken.
✗ Branch 345 not taken.
✗ Branch 346 not taken.
✗ Branch 347 not taken.
✗ Branch 348 not taken.
✗ Branch 349 not taken.
✗ Branch 350 not taken.
✗ Branch 351 not taken.
✗ Branch 352 not taken.
✗ Branch 353 not taken.
✗ Branch 354 not taken.
✗ Branch 355 not taken.
57221182 isExactlyEqual(v0[0], v1[0]) &&
405
52/356
✓ Branch 0 taken 184 times.
✗ Branch 1 not taken.
✓ Branch 2 taken 11 times.
✓ Branch 3 taken 1 times.
✓ Branch 4 taken 663618 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 8 times.
✗ Branch 7 not taken.
✓ Branch 8 taken 64 times.
✗ Branch 9 not taken.
✓ Branch 10 taken 8 times.
✗ Branch 11 not taken.
✓ Branch 12 taken 64 times.
✗ Branch 13 not taken.
✓ Branch 14 taken 8 times.
✗ Branch 15 not taken.
✓ Branch 16 taken 64 times.
✗ Branch 17 not taken.
✓ Branch 18 taken 8 times.
✗ Branch 19 not taken.
✓ Branch 20 taken 64 times.
✗ Branch 21 not taken.
✓ Branch 22 taken 8 times.
✗ Branch 23 not taken.
✓ Branch 24 taken 64 times.
✗ Branch 25 not taken.
✓ Branch 26 taken 8 times.
✗ Branch 27 not taken.
✓ Branch 28 taken 120 times.
✗ Branch 29 not taken.
✓ Branch 30 taken 16 times.
✗ Branch 31 not taken.
✓ Branch 32 taken 64 times.
✗ Branch 33 not taken.
✓ Branch 34 taken 4 times.
✗ Branch 35 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
✗ Branch 38 not taken.
✗ Branch 39 not taken.
✗ Branch 40 not taken.
✗ Branch 41 not taken.
✗ Branch 42 not taken.
✗ Branch 43 not taken.
✗ Branch 44 not taken.
✗ Branch 45 not taken.
✗ Branch 46 not taken.
✗ Branch 47 not taken.
✗ Branch 48 not taken.
✗ Branch 49 not taken.
✗ Branch 50 not taken.
✗ Branch 51 not taken.
✗ Branch 52 not taken.
✗ Branch 53 not taken.
✗ Branch 54 not taken.
✗ Branch 55 not taken.
✗ Branch 56 not taken.
✗ Branch 57 not taken.
✗ Branch 58 not taken.
✗ Branch 59 not taken.
✗ Branch 60 not taken.
✗ Branch 61 not taken.
✗ Branch 62 not taken.
✗ Branch 63 not taken.
✗ Branch 64 not taken.
✗ Branch 65 not taken.
✗ Branch 66 not taken.
✗ Branch 67 not taken.
✗ Branch 68 not taken.
✗ Branch 69 not taken.
✗ Branch 70 not taken.
✗ Branch 71 not taken.
✗ Branch 72 not taken.
✗ Branch 73 not taken.
✗ Branch 74 not taken.
✗ Branch 75 not taken.
✓ Branch 76 taken 2 times.
✗ Branch 77 not taken.
✓ Branch 78 taken 1 times.
✗ Branch 79 not taken.
✗ Branch 80 not taken.
✗ Branch 81 not taken.
✗ Branch 82 not taken.
✗ Branch 83 not taken.
✗ Branch 84 not taken.
✗ Branch 85 not taken.
✗ Branch 86 not taken.
✗ Branch 87 not taken.
✗ Branch 88 not taken.
✗ Branch 89 not taken.
✗ Branch 90 not taken.
✗ Branch 91 not taken.
✗ Branch 92 not taken.
✗ Branch 93 not taken.
✗ Branch 94 not taken.
✗ Branch 95 not taken.
✗ Branch 96 not taken.
✗ Branch 97 not taken.
✗ Branch 98 not taken.
✗ Branch 99 not taken.
✗ Branch 100 not taken.
✗ Branch 101 not taken.
✗ Branch 102 not taken.
✗ Branch 103 not taken.
✗ Branch 104 not taken.
✗ Branch 105 not taken.
✗ Branch 106 not taken.
✗ Branch 107 not taken.
✗ Branch 108 not taken.
✗ Branch 109 not taken.
✗ Branch 110 not taken.
✗ Branch 111 not taken.
✗ Branch 112 not taken.
✗ Branch 113 not taken.
✗ Branch 114 not taken.
✗ Branch 115 not taken.
✗ Branch 116 not taken.
✗ Branch 117 not taken.
✗ Branch 118 not taken.
✗ Branch 119 not taken.
✗ Branch 120 not taken.
✗ Branch 121 not taken.
✗ Branch 122 not taken.
✗ Branch 123 not taken.
✗ Branch 124 not taken.
✗ Branch 125 not taken.
✗ Branch 126 not taken.
✗ Branch 127 not taken.
✗ Branch 128 not taken.
✗ Branch 129 not taken.
✗ Branch 130 not taken.
✗ Branch 131 not taken.
✗ Branch 132 not taken.
✗ Branch 133 not taken.
✗ Branch 134 not taken.
✗ Branch 135 not taken.
✗ Branch 136 not taken.
✗ Branch 137 not taken.
✗ Branch 138 not taken.
✗ Branch 139 not taken.
✗ Branch 140 not taken.
✗ Branch 141 not taken.
✗ Branch 142 not taken.
✗ Branch 143 not taken.
✗ Branch 144 not taken.
✗ Branch 145 not taken.
✗ Branch 146 not taken.
✗ Branch 147 not taken.
✗ Branch 148 not taken.
✗ Branch 149 not taken.
✗ Branch 150 not taken.
✗ Branch 151 not taken.
✗ Branch 152 not taken.
✗ Branch 153 not taken.
✗ Branch 154 not taken.
✗ Branch 155 not taken.
✗ Branch 156 not taken.
✗ Branch 157 not taken.
✗ Branch 158 not taken.
✗ Branch 159 not taken.
✗ Branch 160 not taken.
✗ Branch 161 not taken.
✗ Branch 162 not taken.
✗ Branch 163 not taken.
✗ Branch 164 not taken.
✗ Branch 165 not taken.
✗ Branch 166 not taken.
✗ Branch 167 not taken.
✗ Branch 168 not taken.
✗ Branch 169 not taken.
✗ Branch 170 not taken.
✗ Branch 171 not taken.
✗ Branch 172 not taken.
✗ Branch 173 not taken.
✗ Branch 174 not taken.
✗ Branch 175 not taken.
✗ Branch 176 not taken.
✗ Branch 177 not taken.
✗ Branch 178 not taken.
✗ Branch 179 not taken.
✗ Branch 180 not taken.
✗ Branch 181 not taken.
✗ Branch 182 not taken.
✗ Branch 183 not taken.
✗ Branch 184 not taken.
✗ Branch 185 not taken.
✗ Branch 186 not taken.
✗ Branch 187 not taken.
✗ Branch 188 not taken.
✗ Branch 189 not taken.
✗ Branch 190 not taken.
✗ Branch 191 not taken.
✗ Branch 192 not taken.
✗ Branch 193 not taken.
✗ Branch 194 not taken.
✗ Branch 195 not taken.
✗ Branch 196 not taken.
✗ Branch 197 not taken.
✓ Branch 198 taken 90 times.
✓ Branch 199 taken 2 times.
✓ Branch 200 taken 88 times.
✗ Branch 201 not taken.
✓ Branch 202 taken 90 times.
✗ Branch 203 not taken.
✗ Branch 204 not taken.
✗ Branch 205 not taken.
✗ Branch 206 not taken.
✗ Branch 207 not taken.
✗ Branch 208 not taken.
✗ Branch 209 not taken.
✗ Branch 210 not taken.
✗ Branch 211 not taken.
✗ Branch 212 not taken.
✗ Branch 213 not taken.
✗ Branch 214 not taken.
✗ Branch 215 not taken.
✗ Branch 216 not taken.
✗ Branch 217 not taken.
✗ Branch 218 not taken.
✗ Branch 219 not taken.
✗ Branch 220 not taken.
✗ Branch 221 not taken.
✗ Branch 222 not taken.
✗ Branch 223 not taken.
✓ Branch 224 taken 4684014 times.
✗ Branch 225 not taken.
✓ Branch 226 taken 4684014 times.
✗ Branch 227 not taken.
✓ Branch 228 taken 4684014 times.
✗ Branch 229 not taken.
✓ Branch 230 taken 4684014 times.
✗ Branch 231 not taken.
✓ Branch 232 taken 36882 times.
✗ Branch 233 not taken.
✓ Branch 234 taken 36882 times.
✗ Branch 235 not taken.
✓ Branch 236 taken 36882 times.
✗ Branch 237 not taken.
✗ Branch 238 not taken.
✗ Branch 239 not taken.
✗ Branch 240 not taken.
✗ Branch 241 not taken.
✗ Branch 242 not taken.
✗ Branch 243 not taken.
✗ Branch 244 not taken.
✗ Branch 245 not taken.
✗ Branch 246 not taken.
✗ Branch 247 not taken.
✗ Branch 248 not taken.
✗ Branch 249 not taken.
✗ Branch 250 not taken.
✗ Branch 251 not taken.
✓ Branch 252 taken 4684014 times.
✗ Branch 253 not taken.
✓ Branch 254 taken 4684014 times.
✗ Branch 255 not taken.
✓ Branch 256 taken 4684014 times.
✗ Branch 257 not taken.
✓ Branch 258 taken 4684014 times.
✗ Branch 259 not taken.
✓ Branch 260 taken 36882 times.
✗ Branch 261 not taken.
✓ Branch 262 taken 36882 times.
✗ Branch 263 not taken.
✓ Branch 264 taken 36882 times.
✗ Branch 265 not taken.
✗ Branch 266 not taken.
✗ Branch 267 not taken.
✗ Branch 268 not taken.
✗ Branch 269 not taken.
✗ Branch 270 not taken.
✗ Branch 271 not taken.
✗ Branch 272 not taken.
✗ Branch 273 not taken.
✗ Branch 274 not taken.
✗ Branch 275 not taken.
✗ Branch 276 not taken.
✗ Branch 277 not taken.
✗ Branch 278 not taken.
✗ Branch 279 not taken.
✗ Branch 280 not taken.
✗ Branch 281 not taken.
✗ Branch 282 not taken.
✗ Branch 283 not taken.
✓ Branch 284 taken 4684014 times.
✗ Branch 285 not taken.
✓ Branch 286 taken 4684014 times.
✗ Branch 287 not taken.
✓ Branch 288 taken 4684014 times.
✗ Branch 289 not taken.
✓ Branch 290 taken 4684014 times.
✗ Branch 291 not taken.
✓ Branch 292 taken 36882 times.
✗ Branch 293 not taken.
✓ Branch 294 taken 36882 times.
✗ Branch 295 not taken.
✓ Branch 296 taken 36882 times.
✗ Branch 297 not taken.
✗ Branch 298 not taken.
✗ Branch 299 not taken.
✗ Branch 300 not taken.
✗ Branch 301 not taken.
✗ Branch 302 not taken.
✗ Branch 303 not taken.
✓ Branch 304 taken 4098 times.
✗ Branch 305 not taken.
✓ Branch 306 taken 1 times.
✗ Branch 307 not taken.
✗ Branch 308 not taken.
✗ Branch 309 not taken.
✗ Branch 310 not taken.
✗ Branch 311 not taken.
✗ Branch 312 not taken.
✗ Branch 313 not taken.
✗ Branch 314 not taken.
✗ Branch 315 not taken.
✓ Branch 316 taken 4098 times.
✗ Branch 317 not taken.
✓ Branch 318 taken 1 times.
✗ Branch 319 not taken.
✗ Branch 320 not taken.
✗ Branch 321 not taken.
✗ Branch 322 not taken.
✗ Branch 323 not taken.
✗ Branch 324 not taken.
✗ Branch 325 not taken.
✓ Branch 326 taken 4098 times.
✗ Branch 327 not taken.
✓ Branch 328 taken 1 times.
✗ Branch 329 not taken.
✗ Branch 330 not taken.
✗ Branch 331 not taken.
✗ Branch 332 not taken.
✗ Branch 333 not taken.
✗ Branch 334 not taken.
✗ Branch 335 not taken.
✗ Branch 336 not taken.
✗ Branch 337 not taken.
✗ Branch 338 not taken.
✗ Branch 339 not taken.
✗ Branch 340 not taken.
✗ Branch 341 not taken.
✗ Branch 342 not taken.
✗ Branch 343 not taken.
✗ Branch 344 not taken.
✗ Branch 345 not taken.
✗ Branch 346 not taken.
✗ Branch 347 not taken.
✗ Branch 348 not taken.
✗ Branch 349 not taken.
✗ Branch 350 not taken.
✗ Branch 351 not taken.
✗ Branch 352 not taken.
✗ Branch 353 not taken.
✗ Branch 354 not taken.
✗ Branch 355 not taken.
57217062 isExactlyEqual(v0[1], v1[1]) &&
406
111/712
✓ Branch 0 taken 184 times.
✗ Branch 1 not taken.
✓ Branch 2 taken 183 times.
✓ Branch 3 taken 1 times.
✓ Branch 4 taken 12 times.
✓ Branch 5 taken 1 times.
✓ Branch 6 taken 11 times.
✗ Branch 7 not taken.
✓ Branch 8 taken 663619 times.
✗ Branch 9 not taken.
✓ Branch 10 taken 663618 times.
✗ Branch 11 not taken.
✓ Branch 12 taken 8 times.
✗ Branch 13 not taken.
✓ Branch 14 taken 8 times.
✗ Branch 15 not taken.
✓ Branch 16 taken 64 times.
✗ Branch 17 not taken.
✓ Branch 18 taken 64 times.
✗ Branch 19 not taken.
✓ Branch 20 taken 8 times.
✗ Branch 21 not taken.
✓ Branch 22 taken 8 times.
✗ Branch 23 not taken.
✓ Branch 24 taken 64 times.
✗ Branch 25 not taken.
✓ Branch 26 taken 64 times.
✗ Branch 27 not taken.
✓ Branch 28 taken 8 times.
✗ Branch 29 not taken.
✓ Branch 30 taken 8 times.
✗ Branch 31 not taken.
✓ Branch 32 taken 64 times.
✗ Branch 33 not taken.
✓ Branch 34 taken 64 times.
✗ Branch 35 not taken.
✓ Branch 36 taken 8 times.
✗ Branch 37 not taken.
✓ Branch 38 taken 8 times.
✗ Branch 39 not taken.
✓ Branch 40 taken 64 times.
✗ Branch 41 not taken.
✓ Branch 42 taken 64 times.
✗ Branch 43 not taken.
✓ Branch 44 taken 8 times.
✗ Branch 45 not taken.
✓ Branch 46 taken 8 times.
✗ Branch 47 not taken.
✓ Branch 48 taken 64 times.
✗ Branch 49 not taken.
✓ Branch 50 taken 64 times.
✗ Branch 51 not taken.
✓ Branch 52 taken 8 times.
✗ Branch 53 not taken.
✓ Branch 54 taken 8 times.
✗ Branch 55 not taken.
✓ Branch 56 taken 120 times.
✗ Branch 57 not taken.
✓ Branch 58 taken 120 times.
✗ Branch 59 not taken.
✓ Branch 60 taken 16 times.
✗ Branch 61 not taken.
✓ Branch 62 taken 16 times.
✗ Branch 63 not taken.
✓ Branch 64 taken 64 times.
✗ Branch 65 not taken.
✓ Branch 66 taken 64 times.
✗ Branch 67 not taken.
✓ Branch 68 taken 4 times.
✗ Branch 69 not taken.
✓ Branch 70 taken 4 times.
✗ Branch 71 not taken.
✗ Branch 72 not taken.
✗ Branch 73 not taken.
✗ Branch 74 not taken.
✗ Branch 75 not taken.
✗ Branch 76 not taken.
✗ Branch 77 not taken.
✗ Branch 78 not taken.
✗ Branch 79 not taken.
✗ Branch 80 not taken.
✗ Branch 81 not taken.
✗ Branch 82 not taken.
✗ Branch 83 not taken.
✗ Branch 84 not taken.
✗ Branch 85 not taken.
✗ Branch 86 not taken.
✗ Branch 87 not taken.
✗ Branch 88 not taken.
✗ Branch 89 not taken.
✗ Branch 90 not taken.
✗ Branch 91 not taken.
✗ Branch 92 not taken.
✗ Branch 93 not taken.
✗ Branch 94 not taken.
✗ Branch 95 not taken.
✗ Branch 96 not taken.
✗ Branch 97 not taken.
✗ Branch 98 not taken.
✗ Branch 99 not taken.
✗ Branch 100 not taken.
✗ Branch 101 not taken.
✗ Branch 102 not taken.
✗ Branch 103 not taken.
✗ Branch 104 not taken.
✗ Branch 105 not taken.
✗ Branch 106 not taken.
✗ Branch 107 not taken.
✗ Branch 108 not taken.
✗ Branch 109 not taken.
✗ Branch 110 not taken.
✗ Branch 111 not taken.
✗ Branch 112 not taken.
✗ Branch 113 not taken.
✗ Branch 114 not taken.
✗ Branch 115 not taken.
✗ Branch 116 not taken.
✗ Branch 117 not taken.
✗ Branch 118 not taken.
✗ Branch 119 not taken.
✗ Branch 120 not taken.
✗ Branch 121 not taken.
✗ Branch 122 not taken.
✗ Branch 123 not taken.
✗ Branch 124 not taken.
✗ Branch 125 not taken.
✗ Branch 126 not taken.
✗ Branch 127 not taken.
✗ Branch 128 not taken.
✗ Branch 129 not taken.
✗ Branch 130 not taken.
✗ Branch 131 not taken.
✗ Branch 132 not taken.
✗ Branch 133 not taken.
✗ Branch 134 not taken.
✗ Branch 135 not taken.
✗ Branch 136 not taken.
✗ Branch 137 not taken.
✗ Branch 138 not taken.
✗ Branch 139 not taken.
✗ Branch 140 not taken.
✗ Branch 141 not taken.
✗ Branch 142 not taken.
✗ Branch 143 not taken.
✗ Branch 144 not taken.
✗ Branch 145 not taken.
✗ Branch 146 not taken.
✗ Branch 147 not taken.
✗ Branch 148 not taken.
✗ Branch 149 not taken.
✗ Branch 150 not taken.
✗ Branch 151 not taken.
✗ Branch 152 not taken.
✓ Branch 153 taken 2 times.
✗ Branch 154 not taken.
✓ Branch 155 taken 2 times.
✓ Branch 156 taken 1 times.
✗ Branch 157 not taken.
✗ Branch 158 not taken.
✓ Branch 159 taken 1 times.
✗ Branch 160 not taken.
✗ Branch 161 not taken.
✗ Branch 162 not taken.
✗ Branch 163 not taken.
✗ Branch 164 not taken.
✗ Branch 165 not taken.
✗ Branch 166 not taken.
✗ Branch 167 not taken.
✗ Branch 168 not taken.
✗ Branch 169 not taken.
✗ Branch 170 not taken.
✗ Branch 171 not taken.
✗ Branch 172 not taken.
✗ Branch 173 not taken.
✗ Branch 174 not taken.
✗ Branch 175 not taken.
✗ Branch 176 not taken.
✗ Branch 177 not taken.
✗ Branch 178 not taken.
✗ Branch 179 not taken.
✗ Branch 180 not taken.
✗ Branch 181 not taken.
✗ Branch 182 not taken.
✗ Branch 183 not taken.
✗ Branch 184 not taken.
✗ Branch 185 not taken.
✗ Branch 186 not taken.
✗ Branch 187 not taken.
✗ Branch 188 not taken.
✗ Branch 189 not taken.
✗ Branch 190 not taken.
✗ Branch 191 not taken.
✗ Branch 192 not taken.
✗ Branch 193 not taken.
✗ Branch 194 not taken.
✗ Branch 195 not taken.
✗ Branch 196 not taken.
✗ Branch 197 not taken.
✗ Branch 198 not taken.
✗ Branch 199 not taken.
✗ Branch 200 not taken.
✗ Branch 201 not taken.
✗ Branch 202 not taken.
✗ Branch 203 not taken.
✗ Branch 204 not taken.
✗ Branch 205 not taken.
✗ Branch 206 not taken.
✗ Branch 207 not taken.
✗ Branch 208 not taken.
✗ Branch 209 not taken.
✗ Branch 210 not taken.
✗ Branch 211 not taken.
✗ Branch 212 not taken.
✗ Branch 213 not taken.
✗ Branch 214 not taken.
✗ Branch 215 not taken.
✗ Branch 216 not taken.
✗ Branch 217 not taken.
✗ Branch 218 not taken.
✗ Branch 219 not taken.
✗ Branch 220 not taken.
✗ Branch 221 not taken.
✗ Branch 222 not taken.
✗ Branch 223 not taken.
✗ Branch 224 not taken.
✗ Branch 225 not taken.
✗ Branch 226 not taken.
✗ Branch 227 not taken.
✗ Branch 228 not taken.
✗ Branch 229 not taken.
✗ Branch 230 not taken.
✗ Branch 231 not taken.
✗ Branch 232 not taken.
✗ Branch 233 not taken.
✗ Branch 234 not taken.
✗ Branch 235 not taken.
✗ Branch 236 not taken.
✗ Branch 237 not taken.
✗ Branch 238 not taken.
✗ Branch 239 not taken.
✗ Branch 240 not taken.
✗ Branch 241 not taken.
✗ Branch 242 not taken.
✗ Branch 243 not taken.
✗ Branch 244 not taken.
✗ Branch 245 not taken.
✗ Branch 246 not taken.
✗ Branch 247 not taken.
✗ Branch 248 not taken.
✗ Branch 249 not taken.
✗ Branch 250 not taken.
✗ Branch 251 not taken.
✗ Branch 252 not taken.
✗ Branch 253 not taken.
✗ Branch 254 not taken.
✗ Branch 255 not taken.
✗ Branch 256 not taken.
✗ Branch 257 not taken.
✗ Branch 258 not taken.
✗ Branch 259 not taken.
✗ Branch 260 not taken.
✗ Branch 261 not taken.
✗ Branch 262 not taken.
✗ Branch 263 not taken.
✗ Branch 264 not taken.
✗ Branch 265 not taken.
✗ Branch 266 not taken.
✗ Branch 267 not taken.
✗ Branch 268 not taken.
✗ Branch 269 not taken.
✗ Branch 270 not taken.
✗ Branch 271 not taken.
✗ Branch 272 not taken.
✗ Branch 273 not taken.
✗ Branch 274 not taken.
✗ Branch 275 not taken.
✗ Branch 276 not taken.
✗ Branch 277 not taken.
✗ Branch 278 not taken.
✗ Branch 279 not taken.
✗ Branch 280 not taken.
✗ Branch 281 not taken.
✗ Branch 282 not taken.
✗ Branch 283 not taken.
✗ Branch 284 not taken.
✗ Branch 285 not taken.
✗ Branch 286 not taken.
✗ Branch 287 not taken.
✗ Branch 288 not taken.
✗ Branch 289 not taken.
✗ Branch 290 not taken.
✗ Branch 291 not taken.
✗ Branch 292 not taken.
✗ Branch 293 not taken.
✗ Branch 294 not taken.
✗ Branch 295 not taken.
✗ Branch 296 not taken.
✗ Branch 297 not taken.
✗ Branch 298 not taken.
✗ Branch 299 not taken.
✗ Branch 300 not taken.
✗ Branch 301 not taken.
✗ Branch 302 not taken.
✗ Branch 303 not taken.
✗ Branch 304 not taken.
✗ Branch 305 not taken.
✗ Branch 306 not taken.
✗ Branch 307 not taken.
✗ Branch 308 not taken.
✗ Branch 309 not taken.
✗ Branch 310 not taken.
✗ Branch 311 not taken.
✗ Branch 312 not taken.
✗ Branch 313 not taken.
✗ Branch 314 not taken.
✗ Branch 315 not taken.
✗ Branch 316 not taken.
✗ Branch 317 not taken.
✗ Branch 318 not taken.
✗ Branch 319 not taken.
✗ Branch 320 not taken.
✗ Branch 321 not taken.
✗ Branch 322 not taken.
✗ Branch 323 not taken.
✗ Branch 324 not taken.
✗ Branch 325 not taken.
✗ Branch 326 not taken.
✗ Branch 327 not taken.
✗ Branch 328 not taken.
✗ Branch 329 not taken.
✗ Branch 330 not taken.
✗ Branch 331 not taken.
✗ Branch 332 not taken.
✗ Branch 333 not taken.
✗ Branch 334 not taken.
✗ Branch 335 not taken.
✗ Branch 336 not taken.
✗ Branch 337 not taken.
✗ Branch 338 not taken.
✗ Branch 339 not taken.
✗ Branch 340 not taken.
✗ Branch 341 not taken.
✗ Branch 342 not taken.
✗ Branch 343 not taken.
✗ Branch 344 not taken.
✗ Branch 345 not taken.
✗ Branch 346 not taken.
✗ Branch 347 not taken.
✗ Branch 348 not taken.
✗ Branch 349 not taken.
✗ Branch 350 not taken.
✗ Branch 351 not taken.
✗ Branch 352 not taken.
✗ Branch 353 not taken.
✗ Branch 354 not taken.
✗ Branch 355 not taken.
✗ Branch 356 not taken.
✗ Branch 357 not taken.
✗ Branch 358 not taken.
✗ Branch 359 not taken.
✗ Branch 360 not taken.
✗ Branch 361 not taken.
✗ Branch 362 not taken.
✗ Branch 363 not taken.
✗ Branch 364 not taken.
✗ Branch 365 not taken.
✗ Branch 366 not taken.
✗ Branch 367 not taken.
✗ Branch 368 not taken.
✗ Branch 369 not taken.
✗ Branch 370 not taken.
✗ Branch 371 not taken.
✗ Branch 372 not taken.
✗ Branch 373 not taken.
✗ Branch 374 not taken.
✗ Branch 375 not taken.
✗ Branch 376 not taken.
✗ Branch 377 not taken.
✗ Branch 378 not taken.
✗ Branch 379 not taken.
✗ Branch 380 not taken.
✗ Branch 381 not taken.
✗ Branch 382 not taken.
✗ Branch 383 not taken.
✗ Branch 384 not taken.
✗ Branch 385 not taken.
✗ Branch 386 not taken.
✗ Branch 387 not taken.
✗ Branch 388 not taken.
✗ Branch 389 not taken.
✗ Branch 390 not taken.
✗ Branch 391 not taken.
✗ Branch 392 not taken.
✗ Branch 393 not taken.
✗ Branch 394 not taken.
✗ Branch 395 not taken.
✓ Branch 396 taken 124 times.
✓ Branch 397 taken 104 times.
✗ Branch 398 not taken.
✓ Branch 399 taken 90 times.
✓ Branch 400 taken 132 times.
✓ Branch 401 taken 92 times.
✗ Branch 402 not taken.
✓ Branch 403 taken 88 times.
✓ Branch 404 taken 134 times.
✓ Branch 405 taken 94 times.
✗ Branch 406 not taken.
✓ Branch 407 taken 90 times.
✗ Branch 408 not taken.
✗ Branch 409 not taken.
✗ Branch 410 not taken.
✗ Branch 411 not taken.
✗ Branch 412 not taken.
✗ Branch 413 not taken.
✗ Branch 414 not taken.
✗ Branch 415 not taken.
✗ Branch 416 not taken.
✗ Branch 417 not taken.
✗ Branch 418 not taken.
✗ Branch 419 not taken.
✗ Branch 420 not taken.
✗ Branch 421 not taken.
✗ Branch 422 not taken.
✗ Branch 423 not taken.
✗ Branch 424 not taken.
✗ Branch 425 not taken.
✗ Branch 426 not taken.
✗ Branch 427 not taken.
✗ Branch 428 not taken.
✗ Branch 429 not taken.
✗ Branch 430 not taken.
✗ Branch 431 not taken.
✗ Branch 432 not taken.
✗ Branch 433 not taken.
✗ Branch 434 not taken.
✗ Branch 435 not taken.
✗ Branch 436 not taken.
✗ Branch 437 not taken.
✗ Branch 438 not taken.
✗ Branch 439 not taken.
✗ Branch 440 not taken.
✗ Branch 441 not taken.
✗ Branch 442 not taken.
✗ Branch 443 not taken.
✗ Branch 444 not taken.
✗ Branch 445 not taken.
✗ Branch 446 not taken.
✗ Branch 447 not taken.
✓ Branch 448 taken 4684014 times.
✗ Branch 449 not taken.
✓ Branch 450 taken 4684014 times.
✗ Branch 451 not taken.
✓ Branch 452 taken 4684014 times.
✗ Branch 453 not taken.
✓ Branch 454 taken 4684014 times.
✗ Branch 455 not taken.
✓ Branch 456 taken 4684014 times.
✗ Branch 457 not taken.
✓ Branch 458 taken 4684014 times.
✗ Branch 459 not taken.
✓ Branch 460 taken 4684014 times.
✗ Branch 461 not taken.
✓ Branch 462 taken 4684014 times.
✗ Branch 463 not taken.
✓ Branch 464 taken 36882 times.
✗ Branch 465 not taken.
✓ Branch 466 taken 36882 times.
✗ Branch 467 not taken.
✓ Branch 468 taken 36882 times.
✗ Branch 469 not taken.
✓ Branch 470 taken 36882 times.
✗ Branch 471 not taken.
✓ Branch 472 taken 36882 times.
✗ Branch 473 not taken.
✗ Branch 474 not taken.
✓ Branch 475 taken 36882 times.
✗ Branch 476 not taken.
✗ Branch 477 not taken.
✗ Branch 478 not taken.
✗ Branch 479 not taken.
✗ Branch 480 not taken.
✗ Branch 481 not taken.
✗ Branch 482 not taken.
✗ Branch 483 not taken.
✗ Branch 484 not taken.
✗ Branch 485 not taken.
✗ Branch 486 not taken.
✗ Branch 487 not taken.
✗ Branch 488 not taken.
✗ Branch 489 not taken.
✗ Branch 490 not taken.
✗ Branch 491 not taken.
✗ Branch 492 not taken.
✗ Branch 493 not taken.
✗ Branch 494 not taken.
✗ Branch 495 not taken.
✗ Branch 496 not taken.
✗ Branch 497 not taken.
✗ Branch 498 not taken.
✗ Branch 499 not taken.
✗ Branch 500 not taken.
✗ Branch 501 not taken.
✗ Branch 502 not taken.
✗ Branch 503 not taken.
✓ Branch 504 taken 4684014 times.
✗ Branch 505 not taken.
✓ Branch 506 taken 4684014 times.
✗ Branch 507 not taken.
✓ Branch 508 taken 4684014 times.
✗ Branch 509 not taken.
✓ Branch 510 taken 4684014 times.
✗ Branch 511 not taken.
✓ Branch 512 taken 4684014 times.
✗ Branch 513 not taken.
✓ Branch 514 taken 4684014 times.
✗ Branch 515 not taken.
✓ Branch 516 taken 4684014 times.
✗ Branch 517 not taken.
✓ Branch 518 taken 4684014 times.
✗ Branch 519 not taken.
✓ Branch 520 taken 36882 times.
✗ Branch 521 not taken.
✓ Branch 522 taken 36882 times.
✗ Branch 523 not taken.
✓ Branch 524 taken 36882 times.
✗ Branch 525 not taken.
✓ Branch 526 taken 36882 times.
✗ Branch 527 not taken.
✓ Branch 528 taken 36882 times.
✗ Branch 529 not taken.
✗ Branch 530 not taken.
✓ Branch 531 taken 36882 times.
✗ Branch 532 not taken.
✗ Branch 533 not taken.
✗ Branch 534 not taken.
✗ Branch 535 not taken.
✗ Branch 536 not taken.
✗ Branch 537 not taken.
✗ Branch 538 not taken.
✗ Branch 539 not taken.
✗ Branch 540 not taken.
✗ Branch 541 not taken.
✗ Branch 542 not taken.
✗ Branch 543 not taken.
✗ Branch 544 not taken.
✗ Branch 545 not taken.
✗ Branch 546 not taken.
✗ Branch 547 not taken.
✗ Branch 548 not taken.
✗ Branch 549 not taken.
✗ Branch 550 not taken.
✗ Branch 551 not taken.
✗ Branch 552 not taken.
✗ Branch 553 not taken.
✗ Branch 554 not taken.
✗ Branch 555 not taken.
✗ Branch 556 not taken.
✗ Branch 557 not taken.
✗ Branch 558 not taken.
✗ Branch 559 not taken.
✗ Branch 560 not taken.
✗ Branch 561 not taken.
✗ Branch 562 not taken.
✗ Branch 563 not taken.
✗ Branch 564 not taken.
✗ Branch 565 not taken.
✗ Branch 566 not taken.
✗ Branch 567 not taken.
✓ Branch 568 taken 4684014 times.
✗ Branch 569 not taken.
✓ Branch 570 taken 4684014 times.
✗ Branch 571 not taken.
✓ Branch 572 taken 4684014 times.
✗ Branch 573 not taken.
✓ Branch 574 taken 4684014 times.
✗ Branch 575 not taken.
✓ Branch 576 taken 4684014 times.
✗ Branch 577 not taken.
✓ Branch 578 taken 4684014 times.
✗ Branch 579 not taken.
✓ Branch 580 taken 4684014 times.
✗ Branch 581 not taken.
✓ Branch 582 taken 4684014 times.
✗ Branch 583 not taken.
✓ Branch 584 taken 36882 times.
✗ Branch 585 not taken.
✓ Branch 586 taken 36882 times.
✗ Branch 587 not taken.
✓ Branch 588 taken 36882 times.
✗ Branch 589 not taken.
✓ Branch 590 taken 36882 times.
✗ Branch 591 not taken.
✓ Branch 592 taken 36882 times.
✗ Branch 593 not taken.
✗ Branch 594 not taken.
✓ Branch 595 taken 36882 times.
✗ Branch 596 not taken.
✗ Branch 597 not taken.
✗ Branch 598 not taken.
✗ Branch 599 not taken.
✗ Branch 600 not taken.
✗ Branch 601 not taken.
✗ Branch 602 not taken.
✗ Branch 603 not taken.
✗ Branch 604 not taken.
✗ Branch 605 not taken.
✗ Branch 606 not taken.
✗ Branch 607 not taken.
✓ Branch 608 taken 8196 times.
✓ Branch 609 taken 28686 times.
✗ Branch 610 not taken.
✓ Branch 611 taken 4098 times.
✓ Branch 612 taken 2 times.
✓ Branch 613 taken 7 times.
✗ Branch 614 not taken.
✓ Branch 615 taken 1 times.
✗ Branch 616 not taken.
✗ Branch 617 not taken.
✗ Branch 618 not taken.
✗ Branch 619 not taken.
✗ Branch 620 not taken.
✗ Branch 621 not taken.
✗ Branch 622 not taken.
✗ Branch 623 not taken.
✗ Branch 624 not taken.
✗ Branch 625 not taken.
✗ Branch 626 not taken.
✗ Branch 627 not taken.
✗ Branch 628 not taken.
✗ Branch 629 not taken.
✗ Branch 630 not taken.
✗ Branch 631 not taken.
✓ Branch 632 taken 4098 times.
✓ Branch 633 taken 32784 times.
✗ Branch 634 not taken.
✓ Branch 635 taken 4098 times.
✓ Branch 636 taken 1 times.
✓ Branch 637 taken 8 times.
✗ Branch 638 not taken.
✓ Branch 639 taken 1 times.
✗ Branch 640 not taken.
✗ Branch 641 not taken.
✗ Branch 642 not taken.
✗ Branch 643 not taken.
✗ Branch 644 not taken.
✗ Branch 645 not taken.
✗ Branch 646 not taken.
✗ Branch 647 not taken.
✗ Branch 648 not taken.
✗ Branch 649 not taken.
✗ Branch 650 not taken.
✗ Branch 651 not taken.
✓ Branch 652 taken 4098 times.
✓ Branch 653 taken 32784 times.
✗ Branch 654 not taken.
✓ Branch 655 taken 4098 times.
✓ Branch 656 taken 1 times.
✓ Branch 657 taken 8 times.
✗ Branch 658 not taken.
✓ Branch 659 taken 1 times.
✗ Branch 660 not taken.
✗ Branch 661 not taken.
✗ Branch 662 not taken.
✗ Branch 663 not taken.
✗ Branch 664 not taken.
✗ Branch 665 not taken.
✗ Branch 666 not taken.
✗ Branch 667 not taken.
✗ Branch 668 not taken.
✗ Branch 669 not taken.
✗ Branch 670 not taken.
✗ Branch 671 not taken.
✗ Branch 672 not taken.
✗ Branch 673 not taken.
✗ Branch 674 not taken.
✗ Branch 675 not taken.
✗ Branch 676 not taken.
✗ Branch 677 not taken.
✗ Branch 678 not taken.
✗ Branch 679 not taken.
✗ Branch 680 not taken.
✗ Branch 681 not taken.
✗ Branch 682 not taken.
✗ Branch 683 not taken.
✗ Branch 684 not taken.
✗ Branch 685 not taken.
✗ Branch 686 not taken.
✗ Branch 687 not taken.
✗ Branch 688 not taken.
✗ Branch 689 not taken.
✗ Branch 690 not taken.
✗ Branch 691 not taken.
✗ Branch 692 not taken.
✗ Branch 693 not taken.
✗ Branch 694 not taken.
✗ Branch 695 not taken.
✗ Branch 696 not taken.
✗ Branch 697 not taken.
✗ Branch 698 not taken.
✗ Branch 699 not taken.
✗ Branch 700 not taken.
✗ Branch 701 not taken.
✗ Branch 702 not taken.
✗ Branch 703 not taken.
✗ Branch 704 not taken.
✗ Branch 705 not taken.
✗ Branch 706 not taken.
✗ Branch 707 not taken.
✗ Branch 708 not taken.
✗ Branch 709 not taken.
✗ Branch 710 not taken.
✗ Branch 711 not taken.
72376782 isExactlyEqual(v0[2], v1[2]) &&
407 isExactlyEqual(v0[3], v1[3]);
408 }
409
410 /// Inequality operator, does exact floating point comparisons
411 template <typename T0, typename T1>
412 inline bool operator!=(const Vec4<T0> &v0, const Vec4<T1> &v1) { return !(v0==v1); }
413
414 /// Multiply each element of the given vector by @a scalar and return the result.
415 template <typename S, typename T>
416 inline Vec4<typename promote<S, T>::type> operator*(S scalar, const Vec4<T> &v)
417 { return v*scalar; }
418
419 /// Multiply each element of the given vector by @a scalar and return the result.
420 template <typename S, typename T>
421 inline Vec4<typename promote<S, T>::type> operator*(const Vec4<T> &v, S scalar)
422 {
423 Vec4<typename promote<S, T>::type> result(v);
424 result *= scalar;
425 return result;
426 }
427
428 /// Multiply corresponding elements of @a v0 and @a v1 and return the result.
429 template <typename T0, typename T1>
430 inline Vec4<typename promote<T0, T1>::type> operator*(const Vec4<T0> &v0, const Vec4<T1> &v1)
431 {
432 Vec4<typename promote<T0, T1>::type> result(v0[0]*v1[0],
433 v0[1]*v1[1],
434 v0[2]*v1[2],
435 v0[3]*v1[3]);
436
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
1 return result;
437 }
438
439 /// Divide @a scalar by each element of the given vector and return the result.
440 template <typename S, typename T>
441 inline Vec4<typename promote<S, T>::type> operator/(S scalar, const Vec4<T> &v)
442 {
443 return Vec4<typename promote<S, T>::type>(scalar/v[0],
444 scalar/v[1],
445 scalar/v[2],
446 scalar/v[3]);
447 }
448
449 /// Divide each element of the given vector by @a scalar and return the result.
450 template <typename S, typename T>
451 inline Vec4<typename promote<S, T>::type> operator/(const Vec4<T> &v, S scalar)
452 {
453 Vec4<typename promote<S, T>::type> result(v);
454 result /= scalar;
455 return result;
456 }
457
458 /// Divide corresponding elements of @a v0 and @a v1 and return the result.
459 template <typename T0, typename T1>
460 inline Vec4<typename promote<T0, T1>::type> operator/(const Vec4<T0> &v0, const Vec4<T1> &v1)
461 {
462 Vec4<typename promote<T0, T1>::type>
463 result(v0[0]/v1[0], v0[1]/v1[1], v0[2]/v1[2], v0[3]/v1[3]);
464
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
1 return result;
465 }
466
467 /// Add corresponding elements of @a v0 and @a v1 and return the result.
468 template <typename T0, typename T1>
469 inline Vec4<typename promote<T0, T1>::type> operator+(const Vec4<T0> &v0, const Vec4<T1> &v1)
470 {
471 Vec4<typename promote<T0, T1>::type> result(v0);
472 result += v1;
473
2/4
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
16 return result;
474 }
475
476 /// Add @a scalar to each element of the given vector and return the result.
477 template <typename S, typename T>
478 inline Vec4<typename promote<S, T>::type> operator+(const Vec4<T> &v, S scalar)
479 {
480 Vec4<typename promote<S, T>::type> result(v);
481 result += scalar;
482 return result;
483 }
484
485 /// Subtract corresponding elements of @a v0 and @a v1 and return the result.
486 template <typename T0, typename T1>
487 inline Vec4<typename promote<T0, T1>::type> operator-(const Vec4<T0> &v0, const Vec4<T1> &v1)
488 {
489 14 Vec4<typename promote<T0, T1>::type> result(v0);
490 result -= v1;
491
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
1 return result;
492 }
493
494 /// Subtract @a scalar from each element of the given vector and return the result.
495 template <typename S, typename T>
496 inline Vec4<typename promote<S, T>::type> operator-(const Vec4<T> &v, S scalar)
497 {
498 Vec4<typename promote<S, T>::type> result(v);
499 result -= scalar;
500 return result;
501 }
502
503 template <typename T>
504 inline bool
505 isApproxEqual(const Vec4<T>& a, const Vec4<T>& b)
506 {
507 return a.eq(b);
508 }
509 template <typename T>
510 inline bool
511
0/2
✗ Branch 0 not taken.
✗ Branch 1 not taken.
110765 isApproxEqual(const Vec4<T>& a, const Vec4<T>& b, const Vec4<T>& eps)
512 {
513
0/2
✗ Branch 0 not taken.
✗ Branch 1 not taken.
110765 return isApproxEqual(a[0], b[0], eps[0]) &&
514
0/2
✗ Branch 0 not taken.
✗ Branch 1 not taken.
110765 isApproxEqual(a[1], b[1], eps[1]) &&
515
0/4
✗ Branch 0 not taken.
✗ Branch 1 not taken.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
221530 isApproxEqual(a[2], b[2], eps[2]) &&
516 110765 isApproxEqual(a[3], b[3], eps[3]);
517 }
518
519 template<typename T>
520 inline Vec4<T>
521 Abs(const Vec4<T>& v)
522 {
523 return Vec4<T>(Abs(v[0]), Abs(v[1]), Abs(v[2]), Abs(v[3]));
524 }
525
526 /// @remark We are switching to a more explicit name because the semantics
527 /// are different from std::min/max. In that case, the function returns a
528 /// reference to one of the objects based on a comparator. Here, we must
529 /// fabricate a new object which might not match either of the inputs.
530
531 /// Return component-wise minimum of the two vectors.
532 template <typename T>
533 inline Vec4<T> minComponent(const Vec4<T> &v1, const Vec4<T> &v2)
534 {
535 return Vec4<T>(
536 std::min(v1.x(), v2.x()),
537 std::min(v1.y(), v2.y()),
538 std::min(v1.z(), v2.z()),
539 std::min(v1.w(), v2.w()));
540 }
541
542 /// Return component-wise maximum of the two vectors.
543 template <typename T>
544 inline Vec4<T> maxComponent(const Vec4<T> &v1, const Vec4<T> &v2)
545 {
546 return Vec4<T>(
547 std::max(v1.x(), v2.x()),
548 std::max(v1.y(), v2.y()),
549 std::max(v1.z(), v2.z()),
550 std::max(v1.w(), v2.w()));
551 }
552
553 /// @brief Return a vector with the exponent applied to each of
554 /// the components of the input vector.
555 template <typename T>
556 inline Vec4<T> Exp(Vec4<T> v) { return v.exp(); }
557
558 /// @brief Return a vector with log applied to each of
559 /// the components of the input vector.
560 template <typename T>
561 inline Vec4<T> Log(Vec4<T> v) { return v.log(); }
562
563 using Vec4i = Vec4<int32_t>;
564 using Vec4ui = Vec4<uint32_t>;
565 using Vec4s = Vec4<float>;
566 using Vec4d = Vec4<double>;
567
568 #if OPENVDB_ABI_VERSION_NUMBER >= 8
569 OPENVDB_IS_POD(Vec4i)
570 OPENVDB_IS_POD(Vec4ui)
571 OPENVDB_IS_POD(Vec4s)
572 OPENVDB_IS_POD(Vec4d)
573 #endif
574
575 } // namespace math
576 } // namespace OPENVDB_VERSION_NAME
577 } // namespace openvdb
578
579 #endif // OPENVDB_MATH_VEC4_HAS_BEEN_INCLUDED
580