Peter Barker
ce53ae63ae
AP_Math: use /2 in place of *0.5f
...
MdB says:
dividing by 2 is actually optimal. It's type correct for all usage, and the compiler generates the multiplication if it's float, and sticks with divide for integers
Godbolt indicates on any optimization level (O1-O3, and Os) that the compiler will correctly optimize the / 2 into a float multiplication if using a float, but if using integer types in the template it will stick with the / 2 which is faster then doing the conversions to/from float.
2019-04-05 23:04:17 -07:00
..
2019-03-30 10:32:24 +11:00
2019-03-28 16:40:57 +11:00
2019-04-05 23:04:17 -07:00
2019-04-05 23:04:17 -07:00
2019-04-05 23:04:17 -07:00
2019-03-28 14:19:01 -07:00
2019-04-06 09:15:22 +11:00
2019-04-02 19:41:45 +11:00
2019-04-05 20:12:53 +11:00
2019-04-05 23:04:17 -07:00
2019-04-05 23:04:17 -07:00
2019-04-05 23:04:17 -07:00
2019-03-28 16:40:57 +11:00
2019-04-02 13:45:13 +11:00
2019-04-05 20:12:53 +11:00
2019-04-06 09:10:28 +11:00
2019-04-05 23:04:17 -07:00
2019-04-05 23:04:17 -07:00
2019-03-28 14:33:44 +11:00
2019-04-05 20:12:53 +11:00
2019-04-06 09:10:28 +11:00
2019-04-05 20:12:53 +11:00
2019-04-06 10:08:39 +11:00
2019-03-24 20:46:17 -07:00
2019-03-28 16:40:58 +11:00
2019-04-02 19:00:02 +11:00
2019-04-05 23:04:17 -07:00
2019-03-26 10:27:54 +11:00
2019-04-05 20:12:53 +11:00
2019-04-06 09:10:28 +11:00
2019-04-06 09:10:28 +11:00
2019-04-05 20:12:53 +11:00
2019-04-05 23:04:17 -07:00
2019-04-06 09:10:28 +11:00
2019-04-05 20:12:53 +11:00
2019-04-02 10:51:12 +11:00
2019-04-02 10:51:12 +11:00
2019-03-23 07:10:50 +11:00
2019-04-06 09:15:22 +11:00
2019-04-06 09:10:28 +11:00
2019-04-06 09:10:28 +11:00
2019-04-06 09:15:22 +11:00
2019-04-02 10:16:30 +11:00
2019-03-26 10:27:54 +11:00
2019-03-26 10:27:54 +11:00
2019-04-05 23:04:17 -07:00
2019-04-06 09:10:28 +11:00
2019-03-26 10:27:54 +11:00
2019-04-06 09:15:22 +11:00
2019-04-01 12:14:25 +11:00
2019-04-05 23:04:17 -07:00
2019-04-06 09:10:28 +11:00
2019-04-05 20:12:53 +11:00
2019-04-05 20:12:53 +11:00
2019-04-05 20:12:53 +11:00
2019-03-28 16:40:57 +11:00
2019-04-05 23:04:17 -07:00
2019-04-05 20:12:53 +11:00
2019-04-02 10:51:12 +11:00