mirror of
https://github.com/ivabus/matrix
synced 2024-12-04 22:15:07 +03:00
Add README.md
Signed-off-by: Ivan Bushchik <ivabus@ivabus.dev>
This commit is contained in:
parent
c5bb96d688
commit
79b0c6a155
1 changed files with 38 additions and 1 deletions
39
README.md
39
README.md
|
@ -1,3 +1,40 @@
|
||||||
# Matrix
|
# Matrix
|
||||||
|
|
||||||
`todo!();`
|
> Oh yes. Matrices.
|
||||||
|
|
||||||
|
## Contents
|
||||||
|
|
||||||
|
- `matrix` - core lib (just matrix addition and multiplication)
|
||||||
|
- `matrix_graphics` - using rotation matrix to rotate things )
|
||||||
|
|
||||||
|
## `matrix_graphics`
|
||||||
|
|
||||||
|
### Run
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cargo run
|
||||||
|
```
|
||||||
|
|
||||||
|
### Configure
|
||||||
|
|
||||||
|
Edit these constants to configure code.
|
||||||
|
|
||||||
|
```rust
|
||||||
|
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](/LICENSE).
|
Loading…
Reference in a new issue