From 2be2cd11107322ac6b9ed1870191686d51a71410 Mon Sep 17 00:00:00 2001 From: simon Date: Thu, 30 Oct 2008 14:59:23 +0000 Subject: corrected a nasty ignored case --- src/matrixOperations/eye/seyea.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/matrixOperations/eye/seyea.c') diff --git a/src/matrixOperations/eye/seyea.c b/src/matrixOperations/eye/seyea.c index 91b56662..2f256b86 100644 --- a/src/matrixOperations/eye/seyea.c +++ b/src/matrixOperations/eye/seyea.c @@ -14,9 +14,10 @@ void seyea(float* in, int _iRows, int _iCols) { - int i ; + int i, j ; - for ( i = 0 ; i < _iRows*_iCols ; i++ ) - in[i] = (i%(_iCols+1) == 0)?1.0f:0.0f ; + for ( i = 0 ; i < _iCols ; i++ ) + for ( j = 0 ; j < _iRows ; j++ ) + in[i*_iRows + j] = (i == j)?1.0f:0 ; } -- cgit