MCPcopy Create free account
hub / github.com/emilk/egui_plot / bounds

Method bounds

egui_plot/src/data.rs:172–190  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

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

Callers 6

compute_boundsMethod · 0.45
render_axis_widgetsMethod · 0.45
show_coordinatesMethod · 0.45
paint_grid_directionMethod · 0.45
show_dynMethod · 0.45
plot_boundsMethod · 0.45

Calls 2

extend_withMethod · 0.80
estimate_boundsMethod · 0.80

Tested by

no test coverage detected