Sierpinski square curve: Difference between revisions
m
Rust - use to_radians method
m (Rust - reformatted with rustfmt) |
m (Rust - use to_radians method) |
||
Line 423:
}
fn draw_line(&mut self, data: Data) -> Data {
▲ let theta = (PI * self.current_angle as f64) / 180.0;
self.current_x += self.line_length * theta.cos();
self.current_y += self.line_length * theta.sin();
|