| Line |
Branch |
Exec |
Source |
| 1 |
|
|
#include "base/vec4.h" |
| 2 |
|
|
|
| 3 |
|
|
namespace eu |
| 4 |
|
|
{ |
| 5 |
|
469 |
v4::v4(float ax, float ay, float az, float aw) |
| 6 |
|
469 |
: x(ax), y(ay), z(az), w(aw) |
| 7 |
|
|
{ |
| 8 |
|
469 |
} |
| 9 |
|
|
|
| 10 |
|
18 |
v4::v4(const v3 &a, float aw) |
| 11 |
|
18 |
: x(a.x), y(a.y), z(a.z), w(aw) |
| 12 |
|
|
{ |
| 13 |
|
18 |
} |
| 14 |
|
|
|
| 15 |
|
1 |
v4::v4(const float *a) |
| 16 |
|
1 |
: x(a[0]), y(a[1]), z(a[2]), w(a[3]) |
| 17 |
|
|
{ |
| 18 |
|
1 |
} |
| 19 |
|
|
|
| 20 |
|
|
v3 |
| 21 |
|
8 |
v4::to_vec3(float ww) const |
| 22 |
|
|
{ |
| 23 |
1/10
✗ Branch 3 → 4 not taken.
✓ Branch 3 → 18 taken 8 times.
✗ Branch 10 → 11 not taken.
✗ Branch 10 → 24 not taken.
✗ Branch 11 → 12 not taken.
✗ Branch 11 → 22 not taken.
✗ Branch 15 → 16 not taken.
✗ Branch 15 → 17 not taken.
✗ Branch 28 → 29 not taken.
✗ Branch 28 → 30 not taken.
|
8 |
ASSERTX(is_equal(w, ww), w, ww); |
| 24 |
|
8 |
return {x, y, z}; |
| 25 |
|
✗ |
} |
| 26 |
|
|
|
| 27 |
|
|
v3 |
| 28 |
|
16 |
v4::to_vec3_persp_div() const |
| 29 |
|
|
{ |
| 30 |
1/10
✗ Branch 3 → 4 not taken.
✓ Branch 3 → 17 taken 16 times.
✗ Branch 9 → 10 not taken.
✗ Branch 9 → 23 not taken.
✗ Branch 10 → 11 not taken.
✗ Branch 10 → 21 not taken.
✗ Branch 14 → 15 not taken.
✗ Branch 14 → 16 not taken.
✗ Branch 27 → 28 not taken.
✗ Branch 27 → 29 not taken.
|
16 |
ASSERTX(is_equal(w, 0.0f) == false, w); |
| 31 |
|
16 |
return {x/w, y/w, z/w}; |
| 32 |
|
✗ |
} |
| 33 |
|
|
|
| 34 |
|
|
float * |
| 35 |
|
1 |
v4::get_data_ptr() |
| 36 |
|
|
{ |
| 37 |
|
1 |
return &x; |
| 38 |
|
|
} |
| 39 |
|
|
|
| 40 |
|
|
const float * |
| 41 |
|
1 |
v4::get_data_ptr() const |
| 42 |
|
|
{ |
| 43 |
|
1 |
return &x; |
| 44 |
|
|
} |
| 45 |
|
|
|
| 46 |
|
2 |
std::string string_from(const v4 &v) |
| 47 |
|
|
{ |
| 48 |
|
4 |
return fmt::format("({}, {}, {}, {})", v.x, v.y, v.z, v.w); |
| 49 |
|
|
} |
| 50 |
|
|
|
| 51 |
2/4
✓ Branch 2 → 3 taken 1 time.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 1 time.
✗ Branch 3 → 8 not taken.
|
1 |
ADD_CATCH_FORMATTER_IMPL(v4) |
| 52 |
|
|
} |
| 53 |
|
|
|