Skip to content

Commit

Permalink
AP_Math: Change numeric and hexadecimal number determination to stand…
Browse files Browse the repository at this point in the history
…ard methods
  • Loading branch information
muramura authored and peterbarker committed Sep 12, 2024
1 parent daee6d2 commit b878d56
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libraries/AP_Math/definitions.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#pragma once

#include <cmath>
#include <ctype.h>

#include <AP_HAL/AP_HAL_Boards.h>

Expand Down Expand Up @@ -127,3 +128,5 @@ static const double WGS84_E = (sqrt(2 * WGS84_F - WGS84_F * WGS84_F));

// kg/m^3 to g/cm^3
#define KG_PER_M3_TO_G_PER_CM3(x) (0.001 * x)

#define ishexa(c) (isdigit(c) || ((c) >= 'A' && (c) <= 'F') || ((c) >= 'a' && (c) <= 'f'))

0 comments on commit b878d56

Please sign in to comment.