Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMatrix::CMatrix operator * (double val, CMatrix &A)
- {
- CMatrix C(A.matrix->rows, A.matrix->columns);
- for(int i=0; i<(A.matrix->rows); i++)
- {
- for(int j=0; j<(A.matrix->columns); j++)
- C.matrix->data[i*A.matrix->columns+j]= (val * A.matrix->data[i*A.matrix->columns+j]);
- }
- return C;
- }
Add Comment
Please, Sign In to add comment