Commit 87ea04f
committed
change atan2_safe to atan2
According to DahBlount:
> Most atan2 implementations for a long time had problems when the inputs were close to machine epsilon or when x was less than or equal to 0
And according to z64555:
> Modern versions of C++ should have an atan2() that works correctly when the inputs are at 0 or near epsilon of the floating point specification, meaning Volition's workaround shouldn't be needed anymore.
So this removes `atan2_safe` and changes all instances to `atan2`. Consequently, the angle range in FRED now shows as [-180, 180] as expected.
Fixes scp-fs2open#3730.1 parent f5a268b commit 87ea04f
File tree
5 files changed
+12
-45
lines changed- code
- hud
- math
- render
5 files changed
+12
-45
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3046 | 3046 | | |
3047 | 3047 | | |
3048 | 3048 | | |
3049 | | - | |
| 3049 | + | |
3050 | 3050 | | |
3051 | 3051 | | |
3052 | 3052 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | 66 | | |
97 | 67 | | |
98 | 68 | | |
| |||
981 | 951 | | |
982 | 952 | | |
983 | 953 | | |
984 | | - | |
| 954 | + | |
985 | 955 | | |
986 | 956 | | |
987 | 957 | | |
| |||
996 | 966 | | |
997 | 967 | | |
998 | 968 | | |
999 | | - | |
| 969 | + | |
1000 | 970 | | |
1001 | 971 | | |
1002 | 972 | | |
| |||
1008 | 978 | | |
1009 | 979 | | |
1010 | 980 | | |
1011 | | - | |
| 981 | + | |
1012 | 982 | | |
1013 | 983 | | |
1014 | 984 | | |
| |||
1054 | 1024 | | |
1055 | 1025 | | |
1056 | 1026 | | |
1057 | | - | |
| 1027 | + | |
1058 | 1028 | | |
1059 | 1029 | | |
1060 | 1030 | | |
| |||
1723 | 1693 | | |
1724 | 1694 | | |
1725 | 1695 | | |
1726 | | - | |
1727 | | - | |
1728 | | - | |
1729 | | - | |
| 1696 | + | |
| 1697 | + | |
| 1698 | + | |
| 1699 | + | |
1730 | 1700 | | |
1731 | 1701 | | |
1732 | 1702 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
485 | 485 | | |
486 | 486 | | |
487 | 487 | | |
488 | | - | |
489 | | - | |
490 | | - | |
491 | 488 | | |
492 | 489 | | |
493 | 490 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
887 | 887 | | |
888 | 888 | | |
889 | 889 | | |
890 | | - | |
| 890 | + | |
891 | 891 | | |
892 | 892 | | |
893 | 893 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
| 97 | + | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
| 100 | + | |
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| |||
0 commit comments