MCPcopy Create free account
hub / github.com/elftausend/graplot / test_x_squared

Function test_x_squared

tests/test.rs:56–72  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

54
55#[test]
56fn 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]

Callers

nothing calls this directly

Calls 1

showMethod · 0.45

Tested by

no test coverage detected