Game Maker Games, Articles, Tutorials & More

Game Maker Network


Howdy, Guest! Please sign in or register an account.

Print

matrix_scale

By Daniel · January 1, 2009

Returns a scaled transformation of some matrix M. This should be a ds_grid filled with real entries.

/* matrix_scale(M, scalar)
 *
 * Returns a scaled transformation of some matrix M. M should be a ds_grid
 * filled with real entries.
 */

var result;

result = ds_grid_create(ds_grid_width(argument0), ds_grid_height(argument0));
ds_grid_copy(result, argument0);

ds_grid_multiply_region(result, 0, 0,
                        ds_grid_width(argument),
                        ds_grid_height(argument0),
                        argument2);

return result;

Categories: Mathematics

Comments

There are no comments to display.

Post a Comment

You must be signed in to post comments.

Advertisement