godot/core/math
lawnjelly efbb28d09a
Make acos and asin safe
A common bug with using acos and asin is that input outside -1 to 1 range will result in Nan output. This can occur due to floating point error in the input.

The standard solution is to provide safe_acos function with clamped input. For Godot it may make more sense to make the standard functions safe.

(cherry picked from commit 50c5ed4876)
2023-05-12 12:31:23 +02:00
..
SCsub
a_star.cpp Enchance the performance of AStar by using a LocalVector(2) 2023-01-27 16:28:11 +03:00
a_star.h Convert en_GB spelling to en_US with codespell 2023-01-23 11:02:20 +01:00
a_star_grid_2d.cpp Enchance the performance of AStar by using a LocalVector(2) 2023-01-27 16:28:11 +03:00
a_star_grid_2d.h Enchance the performance of AStar by using a LocalVector(2) 2023-01-27 16:28:11 +03:00
aabb.cpp One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
aabb.h One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
audio_frame.h One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
basis.cpp Make acos and asin safe 2023-05-12 12:31:23 +02:00
basis.h Cleanup unused engine code v2 2023-01-19 13:02:18 +01:00
bvh.h BVH - fix lockguards for multithread mode 2023-02-20 15:15:18 +00:00
bvh_abb.h Convert en_GB spelling to en_US with codespell 2023-01-23 11:02:20 +01:00
bvh_cull.inc Merge pull request #57630 from lawnjelly/bvh4_templated_checks 2022-03-04 23:29:38 +01:00
bvh_debug.inc Merge pull request #57630 from lawnjelly/bvh4_templated_checks 2022-03-04 23:29:38 +01:00
bvh_integrity.inc Dynamic BVH broadphase in 2D & 3D Godot Physics 2021-05-10 16:28:55 -07:00
bvh_logic.inc BVH - Sync BVH with 3.x 2022-02-04 16:51:21 +00:00
bvh_misc.inc BVH - Sync BVH with 3.x 2022-02-04 16:51:21 +00:00
bvh_pair.inc BVH - Sync BVH with 3.x 2022-02-04 16:51:21 +00:00
bvh_public.inc Fixup BVH debugging statements 2022-07-25 18:21:53 +02:00
bvh_refit.inc BVH - fix stale current_tree in deactivate function [4.x] 2021-05-29 18:03:43 +01:00
bvh_split.inc Convert en_GB spelling to en_US with codespell 2023-01-23 11:02:20 +01:00
bvh_structs.inc Fix array-bounds warning in BVH 2022-09-22 16:06:25 +01:00
bvh_tree.h One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
color.cpp Convert en_GB spelling to en_US with codespell 2023-01-23 11:02:20 +01:00
color.h One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
color_names.inc One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
convex_hull.cpp One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
convex_hull.h One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
delaunay_2d.h One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
delaunay_3d.h Use range iterators in LocalVector loops 2023-01-21 18:44:42 +01:00
disjoint_set.h One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
dynamic_bvh.cpp Fix various typos with codespell 2023-02-01 08:45:41 +01:00
dynamic_bvh.h Fix various typos with codespell 2023-02-01 08:45:41 +01:00
expression.cpp Add support for Unicode identifiers in Expression class 2023-01-21 13:39:42 -03:00
expression.h One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
face3.cpp Cleanup unused engine code v2 2023-01-19 13:02:18 +01:00
face3.h Cleanup unused engine code v2 2023-01-19 13:02:18 +01:00
geometry_2d.cpp Cleanup unused engine code v2 2023-01-19 13:02:18 +01:00
geometry_2d.h Cleanup unused engine code v2 2023-01-19 13:02:18 +01:00
geometry_3d.cpp Fix range loop iteration regressions 2023-01-26 00:14:39 +02:00
geometry_3d.h Cleanup unused engine code v2 2023-01-19 13:02:18 +01:00
math_defs.h One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
math_fieldwise.cpp One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
math_fieldwise.h One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
math_funcs.cpp One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
math_funcs.h Make acos and asin safe 2023-05-12 12:31:23 +02:00
plane.cpp One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
plane.h Rename `center` method to `get_center` in Plane. 2023-01-15 17:18:50 +01:00
projection.cpp One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
projection.h One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
quaternion.cpp Make acos and asin safe 2023-05-12 12:31:23 +02:00
quaternion.h One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
quick_hull.cpp More codespell fixes, do more changes from previous ignore list 2023-02-01 12:11:36 +01:00
quick_hull.h One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
random_number_generator.cpp One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
random_number_generator.h One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
random_pcg.cpp One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
random_pcg.h Fix randfn to prevent generating of nan values 2023-03-27 16:59:46 +02:00
rect2.cpp One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
rect2.h Minor typo and docs URL fixes 2023-02-28 13:38:01 +01:00
rect2i.cpp One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
rect2i.h Minor typo and docs URL fixes 2023-02-28 13:38:01 +01:00
static_raycaster.cpp One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
static_raycaster.h One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
transform_2d.cpp More codespell fixes, do more changes from previous ignore list 2023-02-01 12:11:36 +01:00
transform_2d.h Cleanup unused engine code v2 2023-01-19 13:02:18 +01:00
transform_3d.cpp One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
transform_3d.h One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
triangle_mesh.cpp Cleanup unused engine code v2 2023-01-19 13:02:18 +01:00
triangle_mesh.h Cleanup unused engine code v2 2023-01-19 13:02:18 +01:00
triangulate.cpp One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
triangulate.h One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
vector2.cpp One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
vector2.h One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
vector2i.cpp One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
vector2i.h One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
vector3.cpp Bias octahedral tangent y axis to avoid errors around 0 2023-02-13 19:24:14 -08:00
vector3.h Added component-wise `min` and `max` functions for vectors 2023-02-11 15:03:11 -05:00
vector3i.cpp One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
vector3i.h Added component-wise `min` and `max` functions for vectors 2023-02-11 15:03:11 -05:00
vector4.cpp One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
vector4.h Added component-wise `min` and `max` functions for vectors 2023-02-11 15:03:11 -05:00
vector4i.cpp One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
vector4i.h Added component-wise `min` and `max` functions for vectors 2023-02-11 15:03:11 -05:00