2
0
Fork 0
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 +07:00
..
SCsub
a_star.cpp Enchance the performance of AStar by using a LocalVector(2) 2023-01-27 16:28:11 +07:00
a_star.h Convert en_GB spelling to en_US with codespell 2023-01-23 11:02:20 +07:00
a_star_grid_2d.cpp Enchance the performance of AStar by using a LocalVector(2) 2023-01-27 16:28:11 +07:00
a_star_grid_2d.h Enchance the performance of AStar by using a LocalVector(2) 2023-01-27 16:28:11 +07:00
aabb.cpp One Copyright Update to rule them all 2023-01-05 13:25:55 +07:00
aabb.h One Copyright Update to rule them all 2023-01-05 13:25:55 +07:00
audio_frame.h One Copyright Update to rule them all 2023-01-05 13:25:55 +07:00
basis.cpp Make acos and asin safe 2023-05-12 12:31:23 +07:00
basis.h Cleanup unused engine code v2 2023-01-19 13:02:18 +07:00
bvh.h BVH - fix lockguards for multithread mode 2023-02-20 15:15:18 +07:00
bvh_abb.h Convert en_GB spelling to en_US with codespell 2023-01-23 11:02:20 +07:00
bvh_cull.inc
bvh_debug.inc
bvh_integrity.inc
bvh_logic.inc
bvh_misc.inc
bvh_pair.inc
bvh_public.inc
bvh_refit.inc
bvh_split.inc Convert en_GB spelling to en_US with codespell 2023-01-23 11:02:20 +07:00
bvh_structs.inc
bvh_tree.h One Copyright Update to rule them all 2023-01-05 13:25:55 +07:00
color.cpp Convert en_GB spelling to en_US with codespell 2023-01-23 11:02:20 +07:00
color.h One Copyright Update to rule them all 2023-01-05 13:25:55 +07:00
color_names.inc One Copyright Update to rule them all 2023-01-05 13:25:55 +07:00
convex_hull.cpp One Copyright Update to rule them all 2023-01-05 13:25:55 +07:00
convex_hull.h One Copyright Update to rule them all 2023-01-05 13:25:55 +07:00
delaunay_2d.h One Copyright Update to rule them all 2023-01-05 13:25:55 +07:00
delaunay_3d.h Use range iterators in LocalVector loops 2023-01-21 18:44:42 +07:00
disjoint_set.h One Copyright Update to rule them all 2023-01-05 13:25:55 +07:00
dynamic_bvh.cpp Fix various typos with codespell 2023-02-01 08:45:41 +07:00
dynamic_bvh.h Fix various typos with codespell 2023-02-01 08:45:41 +07:00
expression.cpp Add support for Unicode identifiers in Expression class 2023-01-21 13:39:42 +07:00
expression.h One Copyright Update to rule them all 2023-01-05 13:25:55 +07:00
face3.cpp Cleanup unused engine code v2 2023-01-19 13:02:18 +07:00
face3.h Cleanup unused engine code v2 2023-01-19 13:02:18 +07:00
geometry_2d.cpp Cleanup unused engine code v2 2023-01-19 13:02:18 +07:00
geometry_2d.h Cleanup unused engine code v2 2023-01-19 13:02:18 +07:00
geometry_3d.cpp Fix range loop iteration regressions 2023-01-26 00:14:39 +07:00
geometry_3d.h Cleanup unused engine code v2 2023-01-19 13:02:18 +07:00
math_defs.h One Copyright Update to rule them all 2023-01-05 13:25:55 +07:00
math_fieldwise.cpp One Copyright Update to rule them all 2023-01-05 13:25:55 +07:00
math_fieldwise.h One Copyright Update to rule them all 2023-01-05 13:25:55 +07:00
math_funcs.cpp One Copyright Update to rule them all 2023-01-05 13:25:55 +07:00
math_funcs.h Make acos and asin safe 2023-05-12 12:31:23 +07:00
plane.cpp One Copyright Update to rule them all 2023-01-05 13:25:55 +07:00
plane.h Rename `center` method to `get_center` in Plane. 2023-01-15 17:18:50 +07:00
projection.cpp One Copyright Update to rule them all 2023-01-05 13:25:55 +07:00
projection.h One Copyright Update to rule them all 2023-01-05 13:25:55 +07:00
quaternion.cpp Make acos and asin safe 2023-05-12 12:31:23 +07:00
quaternion.h One Copyright Update to rule them all 2023-01-05 13:25:55 +07:00
quick_hull.cpp More codespell fixes, do more changes from previous ignore list 2023-02-01 12:11:36 +07:00
quick_hull.h One Copyright Update to rule them all 2023-01-05 13:25:55 +07:00
random_number_generator.cpp One Copyright Update to rule them all 2023-01-05 13:25:55 +07:00
random_number_generator.h One Copyright Update to rule them all 2023-01-05 13:25:55 +07:00
random_pcg.cpp One Copyright Update to rule them all 2023-01-05 13:25:55 +07:00
random_pcg.h Fix randfn to prevent generating of nan values 2023-03-27 16:59:46 +07:00
rect2.cpp One Copyright Update to rule them all 2023-01-05 13:25:55 +07:00
rect2.h Minor typo and docs URL fixes 2023-02-28 13:38:01 +07:00
rect2i.cpp One Copyright Update to rule them all 2023-01-05 13:25:55 +07:00
rect2i.h Minor typo and docs URL fixes 2023-02-28 13:38:01 +07:00
static_raycaster.cpp One Copyright Update to rule them all 2023-01-05 13:25:55 +07:00
static_raycaster.h One Copyright Update to rule them all 2023-01-05 13:25:55 +07:00
transform_2d.cpp More codespell fixes, do more changes from previous ignore list 2023-02-01 12:11:36 +07:00
transform_2d.h Cleanup unused engine code v2 2023-01-19 13:02:18 +07:00
transform_3d.cpp One Copyright Update to rule them all 2023-01-05 13:25:55 +07:00
transform_3d.h One Copyright Update to rule them all 2023-01-05 13:25:55 +07:00
triangle_mesh.cpp Cleanup unused engine code v2 2023-01-19 13:02:18 +07:00
triangle_mesh.h Cleanup unused engine code v2 2023-01-19 13:02:18 +07:00
triangulate.cpp One Copyright Update to rule them all 2023-01-05 13:25:55 +07:00
triangulate.h One Copyright Update to rule them all 2023-01-05 13:25:55 +07:00
vector2.cpp One Copyright Update to rule them all 2023-01-05 13:25:55 +07:00
vector2.h One Copyright Update to rule them all 2023-01-05 13:25:55 +07:00
vector2i.cpp One Copyright Update to rule them all 2023-01-05 13:25:55 +07:00
vector2i.h One Copyright Update to rule them all 2023-01-05 13:25:55 +07:00
vector3.cpp Bias octahedral tangent y axis to avoid errors around 0 2023-02-13 19:24:14 +07:00
vector3.h Added component-wise `min` and `max` functions for vectors 2023-02-11 15:03:11 +07:00
vector3i.cpp One Copyright Update to rule them all 2023-01-05 13:25:55 +07:00
vector3i.h Added component-wise `min` and `max` functions for vectors 2023-02-11 15:03:11 +07:00
vector4.cpp One Copyright Update to rule them all 2023-01-05 13:25:55 +07:00
vector4.h Added component-wise `min` and `max` functions for vectors 2023-02-11 15:03:11 +07:00
vector4i.cpp One Copyright Update to rule them all 2023-01-05 13:25:55 +07:00
vector4i.h Added component-wise `min` and `max` functions for vectors 2023-02-11 15:03:11 +07:00