1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

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

@@ -433,7 +433,7 @@ PhysicalBone3D *Skeleton3DEditor::create_physical_bone(int bone_id, int bone_chi
/// Get an up vector not collinear with child rest origin
Vector3 up = Vector3(0, 1, 0);
if (up.cross(child_rest.origin).is_equal_approx(Vector3())) {
if (up.cross(child_rest.origin).is_zero_approx()) {
up = Vector3(0, 0, 1);
}