Peter Barker
5692f3d79e
AP_Math: stop returning float for integer wrap_180/wrap_360 etc
5 years ago
Peter Barker
84d999142f
AP_Math: add more tests for wrap functions
5 years ago
Randy Mackay
c7ca9c04f8
AP_Math: add comment to vector2f::point_on_segment
6 years ago
Peter Barker
4c434c2df9
AP_Math: add WARN_IF_UNUSED to bool methods
6 years ago
Andrew Tridgell
2480a62e55
AP_Math: added speed/distance conversions
6 years ago
murata
c5a471e778
AP_Math: Common modbus crc method
6 years ago
Randy Mackay
614b0f6dc8
AP_Math: Polygon_intersects handles unclosed polygons
6 years ago
Peter Barker
da5d5c9203
AP_Math: add tests for Vector2
6 years ago
Randy Mackay
c2bcc0d5f0
AP_Math: define Vector2f::perpendicular
6 years ago
Randy Mackay
071e340827
AP_Math: Polygon_closest_distance_line returns neg numbers
...
value is negative distance from intersection to p2
6 years ago
Andrew Tridgell
6eb816fd3b
AP_Math: add Polygon_closest_distance_line
...
Also add optimisations
6 years ago
Andrew Tridgell
a5fd7ac5ca
AP_Math: add vector2f::closest_distance_between_line_and_point_squared
...
also add vector2f::closest_distance_between_line_and_point and vector2f::closest_distance_between_lines_squared
6 years ago
Andrew Tridgell
2457bf71d4
AP_Math: add simplified vector2f::closest_point
...
this simpler version assumes the line segment originates at the origin
6 years ago
Andrew Tridgell
c8e49259a0
AP_Math: add vector2f::closest_distance_between_radian_and_point_squared
6 years ago
Andrew Tridgell
dbf337e1b3
AP_Math: move closest_point to cpp
6 years ago
Andrew Tridgell
bfc28dfde9
AP_Math: move normalize, reflect, project and perpendicular to cpp
6 years ago
Andrew Tridgell
01e541b7d1
AP_Math: minor formatting changes to length method
6 years ago
Andrew Tridgell
4c4de1f021
AP_Math: vector2f::length_squared always returns float
6 years ago
Andrew Tridgell
46617e6c72
AP_Math: remove unused include from Vector2
6 years ago
Andrew Tridgell
69781cda42
AP_Math: add Vector2::angle
6 years ago
Peter Hall
ea4ecebfc4
AP_Math: add speed unit converstion defs
6 years ago
Peter Barker
e4de5a17d1
AP_Math: add pitch-7 to rotation tests
6 years ago
Andrew Tridgell
e2eda63d2c
AP_Math: added new rotation for PITCH_7
6 years ago
Peter Barker
977fe09276
AP_Math: add a more complex polygon for Polygon_outside tests
6 years ago
Peter Barker
d3971c18fa
AP_Math: more tests for closed-vs-open polygons
6 years ago
Peter Barker
d74e6db12e
AP_Math: add more tests for Polygon_outside
6 years ago
Peter Barker
36fe9a18a0
AP_Math: make Polygon_outside cope with being passed unclosed polygons
6 years ago
Peter Barker
64aafb2af2
AP_Math: add Polygon_outside tests for long template instantiation
6 years ago
Peter Barker
51a0401383
AP_Math: correct Polygon_outside floating point instatiation
...
This routine was entemplatificated from the integer version, which was
designed to be perfect across representable ranges of points. The
floating point version suffered from a rounding problem.
6 years ago
Peter Barker
b35b65eed1
AP_Math: add GTEST suite for Polygon_outside
6 years ago
Peter Barker
f09efe0908
AP_Math: correct URL for Polygon_outside algorithm
6 years ago
Francisco Ferreira
6e95a144ef
AP_Math: add macro for m/s to knots convertion
6 years ago
murata
c6bcb1d54c
AP_Math: Collect CRC16 into CRC file
...
AP_Math: Collect CRC16 into CRC file
6 years ago
Andrew Tridgell
85ce10adfd
AP_Math: fixed test build
6 years ago
murata
7f42be5d3e
AP_Math: Commonize the CRC4 method
6 years ago
Mark Whitehorn
b515431008
AP_Math: add expo and throttle_curve functions
6 years ago
Peter Barker
b22d3a0103
AP_Math: avoid casting floats to int32's for temporary variables
...
Note the use of 64-bit integer arithmetic further down, however
6 years ago
Pierre Kancir
ff4587a33a
AP_Math: move location define to Location class
6 years ago
Pierre Kancir
1854681e09
AP_Math: use past_interval_finish_line and line_path_proportion from Location
6 years ago
Pierre Kancir
4f31c3dcd5
AP_Math: move line_path_proportion to Location
6 years ago
Pierre Kancir
e06d7dbbf7
AP_Math: move location_passed_point to Location and rename
6 years ago
Peter Barker
11dcdc58e0
AP_Math: clean up includes a little
6 years ago
Pierre Kancir
121e5d0abf
AP_Math: move location_3d_diff_NED to Location and rename
6 years ago
Peter Barker
381bb41a5e
AP_Math: make constraining NaNs an internal error
6 years ago
Pierre Kancir
e787922ab0
AP_Math: move check_latlng to Location
6 years ago
Pierre Kancir
b10e75f4e1
AP_Math: move locations_are_same to Location and rename to same_latlon_as
6 years ago
Pierre Kancir
058cade92c
AP_Math: use get_distance_NE instead of location_diff
6 years ago
Pierre Kancir
00fa07ef33
AP_Math: move location_diff to Location and rename
6 years ago
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.
6 years ago
Peter Barker
39ae285a7f
AP_Math: add floating point constant designators
6 years ago