Based On MIT 6.096 lecture node 5
const int* var:varis a pointer to a constintint* const var:varis a const, which is a pointer tointconst int* const var:varis a const, which is a pointer to a constint
Based On MIT 6.096 lecture node 5
const int* var: var is a pointer to a const intint* const var: var is a const, which is a pointer to intconst int* const var: var is a const, which is a pointer to a const intThis is a proof of the vector decomposition omitted in Raytracing in One Weekend, section 10.2(Snell's Law)
Let
Now we can simply decompose
Since the book shows the result of