J
JustSomeGuy
I have a matrix class that I want to add this method to.
basically I want to multiply a matrix by a matrix or by a constant.
However, I don't want to return a matrix (refrence) from the method
as this might be a performance issue.
If one implements the method, then I suppose one is not 'required'
to return the result. However that doesn't sound like 'good' programming
style as others may not realise I've done this.
Consider these two statements:
1) a *= 2;
2) b = a *= 2;
Statement 1 doesn't make use of the return result of the *= operator, where
as
statement 2 does.
So is statement 1 faster than statement 2?
basically I want to multiply a matrix by a matrix or by a constant.
However, I don't want to return a matrix (refrence) from the method
as this might be a performance issue.
If one implements the method, then I suppose one is not 'required'
to return the result. However that doesn't sound like 'good' programming
style as others may not realise I've done this.
Consider these two statements:
1) a *= 2;
2) b = a *= 2;
Statement 1 doesn't make use of the return result of the *= operator, where
as
statement 2 does.
So is statement 1 faster than statement 2?