QColorMatrix.cpp
// Assumes that v points to (at least) four REALs.

Assumes that v points to (at least) four REALs.
Assumes that v points to ( at least ) four REALs .
Status QColorMatrix::TransformVector(REAL * v) const
{
	if (! v) return InvalidParameter;
	REAL temp[4];
	for (int x = 0; x < 4; x++)
	{
		temp[x] = m[4][x];
		for (int y = 0; y < 4; y++) temp[x] += v[y] * m[y][x];
	}
	for (int x = 0; x < 4; x++)
		v[x] = temp[x];
	return Ok;
}
Status QColorMatrix :: TransformVector ( REAL * v ) const { if ( ! v ) return InvalidParameter ; REAL temp [ 4 ] ; for ( int x = 0 ; x < 4 ; x ++ ) { temp [ x ] = m [ 4 ] [ x ] ; for ( int y = 0 ; y < 4 ; y ++ ) temp [ x ] += v [ y ] * m [ y ] [ x ] ; } for ( int x = 0 ; x < 4 ; x ++ ) v [ x ] = temp [ x ] ; return Ok ; }
Assumes that v points to (at least) four REALs.
Assumes that v points to ( at least ) four REALs .