Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does it mean to "preconcat" a matrix in Android?

In reviewing: http://developer.android.com/reference/android/graphics/Canvas.html

I'm wondering

translate(): "preconcat the current matrix with the specified translation" -- what does this mean?

I can't find a good definition of "preconcat" anywhere on the internet! The only place I can find it is in the Android Source - I'm starting to wonder if they made it up? :)

I'm familiar with "concat" or concatenate, which is to append to, so what is a pre-concat?

like image 986
Brad Hein Avatar asked Apr 23 '10 01:04

Brad Hein


1 Answers

When working with matrices, the word concatenation refers to multiplication.

Since matrix multiplication is not commutative, there is a separate word for backwards multiplication.
Pre-concatenating a to b means setting a = b × a. (As opposed to a = a × b, which will give a different matrix)

like image 123
SLaks Avatar answered Oct 24 '22 10:10

SLaks