()
| 54 | |
| 55 | #[test] |
| 56 | fn test_x_squared() { |
| 57 | let mut xs = [0.; 20000]; |
| 58 | |
| 59 | let mut add = -10000f64; |
| 60 | for idx in 0..20000 { |
| 61 | xs[idx] = add / 1000.; |
| 62 | add += 1.; |
| 63 | } |
| 64 | |
| 65 | let mut ys = [0.; 20000]; |
| 66 | for (i, y) in ys.iter_mut().enumerate() { |
| 67 | *y = xs[i].powf(2.); |
| 68 | } |
| 69 | |
| 70 | let plot = Plot::new((xs, ys)); |
| 71 | plot.show(); |
| 72 | } |
| 73 | |
| 74 | #[cfg(not(target_os = "linux"))] |
| 75 | #[test] |