Game Development for Xbox 360, PC + Windows Phone 7

Chapter 3, pp 42 - 43

rated by 0 users
Answered (Verified) This post has 1 verified answer | 1 Reply | 2 Followers

Top 50 Contributor
2 Posts
PhilBell posted on 18 Aug 2010 3:52 PM

The code for

        public void TransformVectorByReference()

and

         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?

Answered (Verified) Verified Answer

Top 10 Contributor
Male
135 Posts

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.

Thanks,

Chad

Page 1 of 1 (2 items) | RSS
© 2011 Chad Carter. All rights reserved.