Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use std::f32;
- fn main() {
- let steps = 1024;
- let max = 255f32;
- for i in 0..steps {
- let mul = (i as f32 / steps as f32) * f32::consts::PI * 2.0;
- println!("{},", ((mul.cos() / 2.0 + 0.5) * max as f32) as u32);
- }
- }
Add Comment
Please, Sign In to add comment