Add is_zero_approx methods to Vector2, 3, and 4

This commit is contained in:
Jonathan Nicholl
2022-09-01 20:32:33 -04:00
parent c6fd311da0
commit 15d057c521
26 changed files with 70 additions and 31 deletions

View File

@ -431,7 +431,7 @@ void PopupMenu::gui_input(const Ref<InputEvent> &p_event) {
Ref<InputEventMouseMotion> m = p_event;
if (m.is_valid()) {
if (m->get_velocity().is_equal_approx(Vector2())) {
if (m->get_velocity().is_zero_approx()) {
return;
}
activated_by_keyboard = false;