|
Post by georgios on Jan 25, 2019 18:46:38 GMT
Hello,
just wanted to clarify if the "Negating Tuples" chapter suggests to make a copy of the tuple and negate the copy or doing an in place change of the tuple. I'm using operator overloading in C++ and I have to decide if I'll modify the tuple itself or return a negated copy of the tuple. I think we should return a negated copy, but I want to double check.
BTW, I really enjoy the book.
Regards, Georgios
|
|
|
Post by Jamis on Jan 26, 2019 5:13:47 GMT
Hello georgios ! It really depends on how you want to structure your ray tracer, but the tests assume the operation creates a copy of the tuple and negates that, rather than negating the tuple in place.
|
|