(i: usize, size_x: f64, odd: bool)
| 141 | } |
| 142 | |
| 143 | fn tri_i2x(i: usize, size_x: f64, odd: bool) -> f64 { |
| 144 | let mut x = (i as f64) * size_x; |
| 145 | if odd { |
| 146 | x += 0.5 * size_x; |
| 147 | } |
| 148 | x |
| 149 | } |
| 150 | |
| 151 | fn tri_j2y(j: usize, triangle_height: f64) -> f64 { |
| 152 | (j as f64) * triangle_height |