XNA Essentials

Game Programming for Xbox 360, PC + Windows Phone


Chapter 3, pp 42 - 43

The code for

        public void TransformVectorByReference()


         public void TransformVectorByReferenceAndOut()

seem to be identical?  If the aim is to compare parameter mechanisms, would it be better to perform secondary calculations like calculating the rotationMatrix once, only rather than once per call, and use a constant for the angle rather than calculate the radian equivalent of a constant at every call?

PhilBell - Wednesday, August 18, 2010 @ 3:52 PM

Re: Chapter 3, pp 42 - 43

The first call shouldn't have had the last parameter as an out, but rather used the return value.  Those test measures were just examples to build off of.  I appreciate you letting me know about the issue.  I'll make sure to update the errata.



Chad Carter - Monday, August 23, 2010 @ 7:21 AM