diff options
author | lawnjelly <lawnjelly@gmail.com> | 2023-05-09 13:49:26 +0100 |
---|---|---|
committer | RĂ©mi Verschelde <rverschelde@gmail.com> | 2023-05-12 12:31:23 +0200 |
commit | efbb28d09a2a4aaa53875edd827e08137f9f19f4 (patch) | |
tree | 01516ffb51e02974f48ac1643f38de29396ec6fd /editor/plugins/theme_editor_preview.cpp | |
parent | b91b8fce43ab9cb9f8c96f8c640acc801774b6b5 (diff) |
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 50c5ed4876250f785be54b8f6124e7663afa38dc)
Diffstat (limited to 'editor/plugins/theme_editor_preview.cpp')
0 files changed, 0 insertions, 0 deletions