Convert a point in plot coordinates to a point in world coordinates modulo the canvas position
(&self, v: Vec2)
| 990 | |
| 991 | /// Convert a point in plot coordinates to a point in world coordinates modulo the canvas position |
| 992 | pub fn to_local(&self, v: Vec2) -> Vec2 { |
| 993 | self.zero_world + v * self.canvas_size / (self.bounds.up - self.bounds.lo) / (1.0 + self.outer_border.x) |
| 994 | } |
| 995 | |
| 996 | /// Convert a point in world coordinates to a point in the graph coordinates. |
| 997 | pub fn world_to_plot(&self, v: Vec2) -> Vec2 { |
no outgoing calls
no test coverage detected