# The Ray Tracer Challenge: Getting rotationX matrix test to pass \[SOLVED\]

**URL:** <https://forum.devtalk.com/t/the-ray-tracer-challenge-getting-rotationx-matrix-test-to-pass-solved/215932>\
**Category:** PragProg Customers\
**Tags:** book-the-ray-tracer-challenge, question\
**Created:** [24 September 2025 14:35 UTC](https://forum.devtalk.com/t/the-ray-tracer-challenge-getting-rotationx-matrix-test-to-pass-solved/215932 "2025-09-24T14:35:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![keithstellyes](https://forum.devtalk.com/user_avatar/forum.devtalk.com/keithstellyes/32/7670_2.png) [@keithstellyes](https://forum.devtalk.com/u/keithstellyes)\
**Post date:** [24 September 2025 14:35 UTC](https://forum.devtalk.com/t/the-ray-tracer-challenge-getting-rotationx-matrix-test-to-pass-solved/215932/1 "2025-09-24T14:35:49Z")

</div>

EDIT: I misread the scientific notation, I was getting, “-4.37114e-08”, turns out that’s almost 0. GTest’s ASSERT\_FLOAT\_EQ is super conservative by default haha. I’m good. Thanks for such a great book 🙂  
@jamis

I bought the book some years ago and did through a lot of it, but wanted to revisit it from scratch again, as a more experienced programmer.

However, for the test of multiplying a rotation X matrix of pi/2 radians by a Point(0, 0, 1), it fails generating a point where the y component is ~-4.4. Interestingly, the test after for multiplying the inverse(rotation\_x(pi/4)), my code passes that test.

I’m hoping to work on my math skills, but I’m not sure exactly where I should be focusing my debugging efforts, or what tests to catch potentially if theere’s some other issues with dependent code that I missed.

Thanks again for a great book

---

<div class="post-metadata">

**Author:** ![jamis](https://forum.devtalk.com/user_avatar/forum.devtalk.com/jamis/32/1083_2.png) [@jamis](https://forum.devtalk.com/u/jamis)\
**Post date:** [27 September 2025 13:10 UTC](https://forum.devtalk.com/t/the-ray-tracer-challenge-getting-rotationx-matrix-test-to-pass-solved/215932/2 "2025-09-27T13:10:30Z")

</div>

I’m so glad you figured it out! Thanks for trying the book. It was a lot of fun to write. 🙂
