chore: rename some struct fields

This commit is contained in:
Rekai Nyangadzayi Musuka 2021-03-29 16:47:52 -05:00
parent fb7aef0a4b
commit 42c783448e
1 changed files with 8 additions and 8 deletions

View File

@ -15,8 +15,8 @@ fn main() {
struct SpriteScale {
zoom: f64,
horiz: f64,
verti: f64,
horizontal: f64,
vertical: f64,
step: f64,
iterations: u32,
}
@ -25,8 +25,8 @@ impl Default for SpriteScale {
fn default() -> Self {
Self {
zoom: 1.0,
horiz: 0.0,
verti: 0.0,
horizontal: 0.0,
vertical: 0.0,
step: 0.01,
iterations: 64,
}
@ -45,8 +45,8 @@ fn transform_mandelbrot_system(
let iter_mod = input.pressed(KeyCode::T) as i8 - input.pressed(KeyCode::G) as i8;
scale.step += (scale.step / 10.0) * step_mod as f64;
scale.verti += scale.step * vertical as f64;
scale.horiz += scale.step * horizontal as f64;
scale.vertical += scale.step * vertical as f64;
scale.horizontal += scale.step * horizontal as f64;
scale.zoom += scale.step * zoom as f64;
if iter_mod == 1 {
@ -86,8 +86,8 @@ fn mandelbrot_render_system(
if let Some(texture_handle) = &material.texture {
if let Some(texture) = textures.get_mut(texture_handle) {
let z = scale.zoom;
let h = scale.horiz;
let v = scale.verti;
let h = scale.horizontal;
let v = scale.vertical;
let iters = scale.iterations;
let start = Instant::now();