Description: Code alarm processing#5

IssueNo: https://gitee.com/openharmony/graphic_ui/issues/I5WD6I
Feature or Bugfix: Bugfix
Binary Source:No
Signed-off-by: youbing54<youbing3@huawei.com>
This commit is contained in:
youbing
2022-10-18 16:50:53 +08:00
parent c5b92ae0ee
commit ca298f2b19
4 changed files with 6 additions and 7 deletions
+2 -2
View File
@@ -57,9 +57,9 @@ float Sin(float angle)
#endif
}
float Fmod(float X, float Y)
float Fmod(float x, float y)
{
return static_cast<float>(X - static_cast<int>(X / Y) * Y);
return static_cast<float>(x - static_cast<int>(x / y) * y);
}
float Cos(float angle)
-1
View File
@@ -21,7 +21,6 @@
#include <windows.h>
#elif defined __linux__ || defined __LITEOS__ || defined __APPLE__
#include <ctime>
#include "time.h"
#else
#include "los_tick.h"
#endif
+3 -3
View File
@@ -23,12 +23,12 @@
#define ALIGN_UP(sz, align) (((sz) + (align - 1)) & (-(align)))
#define ALIGN_DOWN(sz, align) ((sz) & (-(align)))
#define _ADDR_ALIGN(ptr, sz, align) \
#define ADDR_ALIGN(ptr, sz, align) \
do { \
uint32_t _sz = ALIGN_DOWN(sz, align); \
(ptr) = decltype(ptr)((uintptr_t)(void*)(ptr) + ((sz)-_sz)); \
(sz) = _sz; \
} while (0);
} while (0)
#define STRUCT_ALIGN(sz) alignas(sz)
#ifdef ALIGNMENT_BYTES
@@ -37,7 +37,7 @@
#endif
#define UI_ALIGN_UP(size) ALIGN_UP((size), ALIGNMENT_BYTES)
#define UI_ALIGN_DOWN(size) ALIGN_DOWN((size), ALIGNMENT_BYTES)
#define UI_ADDR_ALIGN(ptr, sz) _ADDR_ALIGN(ptr, sz, ALIGNMENT_BYTES)
#define UI_ADDR_ALIGN(ptr, sz) ADDR_ALIGN(ptr, sz, ALIGNMENT_BYTES)
#define UI_STRUCT_ALIGN STRUCT_ALIGN(ALIGNMENT_BYTES)
#else
#define UI_ALIGN_UP(size) ALIGN_UP((size), 4U)
+1 -1
View File
@@ -85,7 +85,7 @@ static constexpr int16_t ORDER_MATRIX_4 = 4;
float Sin(float angle);
float Cos(float angle);
float Acos(float value);
float Fmod(float X, float Y);
float Fmod(float x, float y);
uint16_t FastAtan2(int16_t x, int16_t y);
float FastAtan2F(float x, float y);
float Sqrt(float x);