ardupilot/libraries/AP_Math
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
..
benchmarks
examples AP_Math: move get_bearing_cd to Location and rename to get_bearing_to 2019-04-06 09:10:28 +11:00
tests
tools/geodesic_grid
AP_GeodesicGrid.cpp
AP_GeodesicGrid.h
AP_Math.cpp
AP_Math.h AP_Math: fix circulary inclusion error 2019-04-02 19:00:02 +11:00
crc.cpp AP_Math: reduce variable scope in crc_crc8 2019-02-06 21:41:30 +11:00
crc.h AP_Math: correct crc_xmodem definition 2019-02-06 23:20:07 +11:00
definitions.h
edc.cpp
edc.h
location_double.cpp
location.cpp AP_Math: move location_update to Location and rename to offset_bearing 2019-04-06 09:10:28 +11:00
location.h AP_Math: move location_update to Location and rename to offset_bearing 2019-04-06 09:10:28 +11:00
matrix3.cpp AP_Math: use direct assignment for rotate() 2019-02-06 21:41:30 +11:00
matrix3.h AP_Math: add missing include on matrix3 2019-04-02 19:00:02 +11:00
matrix_alg.cpp
matrixN.cpp AP_Math: use /2 in place of *0.5f 2019-04-05 23:04:17 -07:00
matrixN.h
polygon.cpp
polygon.h
quaternion.cpp AP_Math: add quaternion::angular_difference 2019-02-22 13:00:07 +09:00
quaternion.h AP_Math: add quaternion::angular_difference 2019-02-22 13:00:07 +09:00
rotations.h
spline5.cpp AP_Math: const correctness 2018-12-22 08:39:06 +09:00
spline5.h
vector2.cpp AP_Math: const correctness 2018-12-22 08:39:06 +09:00
vector2.h AP_Math: correct copyright, add pragma-once 2019-02-06 23:20:07 +11:00
vector3.cpp AP_Math: const correctness 2018-12-22 08:39:06 +09:00
vector3.h AP_Math: remove non-ascii caracter 2018-12-22 08:39:23 +09:00
vectorN.h