Sierpinski curve: Difference between revisions
Content added Content deleted
m (Rust - reformatted with rustfmt) |
m (Rust - use to_radians method) |
||
Line 654: | Line 654: | ||
} |
} |
||
fn draw_line(&mut self, data: Data) -> Data { |
fn draw_line(&mut self, data: Data) -> Data { |
||
⚫ | |||
use std::f64::consts::PI; |
|||
⚫ | |||
self.current_x += self.line_length * theta.cos(); |
self.current_x += self.line_length * theta.cos(); |
||
self.current_y -= self.line_length * theta.sin(); |
self.current_y -= self.line_length * theta.sin(); |