MCPcopy Create free account
hub / github.com/eliotbo/bevy_plot / compute_zeros

Method compute_zeros

src/plot/plot.rs:973–982  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

971 }
972
973 pub(crate) fn compute_zeros(&mut self) {
974 let lo_world = -self.canvas_size / 2.0 / (1.0 + self.outer_border);
975
976 let v = Vec2::new(
977 self.bounds.lo.x * self.canvas_size.x / (1.0 + self.outer_border.x) / (self.bounds.up.x - self.bounds.lo.x),
978 self.bounds.lo.y * self.canvas_size.y / (1.0 + self.outer_border.y) / (self.bounds.up.y - self.bounds.lo.y),
979 );
980
981 self.zero_world = lo_world - v;
982 }
983
984 pub(crate) fn compute_bounds_world(&self) -> PlotCanvasBounds {
985 let lo = self.to_local(self.bounds.lo);

Callers 10

defaultMethod · 0.80
set_boundsMethod · 0.80
update_mouse_targetFunction · 0.80
adjust_graph_axesFunction · 0.80
update_bezier_uniformFunction · 0.80
plot_fnFunction · 0.80
update_bezier_uniformFunction · 0.80
plot_fnFunction · 0.80
plot_segmentsFunction · 0.80
plot_segmentsFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected