(&self)
| 170 | } |
| 171 | |
| 172 | pub fn bounds(&self) -> PlotBounds { |
| 173 | match self { |
| 174 | Self::Owned(points) => { |
| 175 | let mut bounds = PlotBounds::NOTHING; |
| 176 | for point in points { |
| 177 | bounds.extend_with(point); |
| 178 | } |
| 179 | bounds |
| 180 | } |
| 181 | Self::Generator(generator) => generator.estimate_bounds(), |
| 182 | Self::Borrowed(points) => { |
| 183 | let mut bounds = PlotBounds::NOTHING; |
| 184 | for point in *points { |
| 185 | bounds.extend_with(point); |
| 186 | } |
| 187 | bounds |
| 188 | } |
| 189 | } |
| 190 | } |
| 191 | } |
| 192 | |
| 193 | /// Describes a function y = f(x) with an optional range for x and a number of |
no test coverage detected