Skip to content

Commit

Permalink
Update rendering.ino
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanPetrick authored May 13, 2023
1 parent aa8741b commit 7dc12b5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rendering.ino
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ float render_value(render_parameters &animation) {
if (raw_noise_field_value < animation.low_limit) raw_noise_field_value = animation.low_limit;
if (raw_noise_field_value > animation.high_limit) raw_noise_field_value = animation.high_limit;

float scaled_noise_value = map(raw_noise_field_value, animation.low_limit, animation.high_limit, 0, 255);
float scaled_noise_value = map_float(raw_noise_field_value, animation.low_limit, animation.high_limit, 0, 255);

return scaled_noise_value;
}
Expand All @@ -44,7 +44,7 @@ void render_polar_lookup_table(float cx, float cy) {
}
}

/* ...too slow!


// float mapping maintaining 32 bit precision
// we keep values with high resolution for potential later usage
Expand All @@ -57,7 +57,7 @@ float map_float(float x, float in_min, float in_max, float out_min, float out_ma

return result;
}
*/


/* unnecessary bloat
Expand Down

0 comments on commit 7dc12b5

Please sign in to comment.