8000 GitHub - ivabus/matrix: mе trying to do something with matrices
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

ivabus/matrix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Matrix

Oh yes. Matrices.

Contents

  • matrix - core lib (just matrix addition and multiplication)
  • matrix_graphics - using rotation matrix to rotate things (polygons by default)

matrix_graphics

Run

cargo run

Configure

Edit these constants to configure code.

const WIDTH: u32 = 640;
// width of window
const HEIGHT: u32 = 480;
// height of window
const POLYGON: usize = 7;
// count of sides of generated polygon (>= 2 for math reasons) 
const CENTER_X: u32 = 320;
// center of polygon by X
const CENTER_Y: u32 = 240;
// center of polygon by Y
const RADIUS: u32 = 100;
// radius of polygon
const DEFAULT_ANGLE: f64 = 0.;
//default rotation angle (in radians)

License

All code is available under the terms of the MIT license.

About

mе trying to do something with matrices

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0