
keithstellyes
The Ray Tracer Challenge: Getting rotationX matrix test to pass [SOLVED]
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
Popular Pragmatic Bookshelf topics










Other popular topics










Categories:
Sub Categories:
Popular Portals
- /elixir
- /rust
- /wasm
- /ruby
- /erlang
- /phoenix
- /keyboards
- /rails
- /js
- /python
- /security
- /go
- /swift
- /vim
- /clojure
- /emacs
- /haskell
- /java
- /onivim
- /typescript
- /svelte
- /kotlin
- /crystal
- /c-plus-plus
- /tailwind
- /react
- /gleam
- /ocaml
- /elm
- /flutter
- /vscode
- /ash
- /html
- /opensuse
- /centos
- /php
- /deepseek
- /zig
- /scala
- /sublime-text
- /textmate
- /lisp
- /debian
- /nixos
- /react-native
- /agda
- /kubuntu
- /arch-linux
- /django
- /revery
- /ubuntu
- /spring
- /manjaro
- /nodejs
- /diversity
- /lua
- /deno
- /julia
- /slackware
- /c