Browse Source

add zmath

master
zhaohe 2 years ago
parent
commit
d921632038
  1. 0
      os/zmath.cpp
  2. 8
      os/zmath.hpp
  3. 2
      os/zos.hpp

0
os/zmath.cpp

8
os/zmath.hpp

@ -0,0 +1,8 @@
#pragma once
#include <stdbool.h>
namespace iflytop {
using namespace std;
static inline float zfabs(float a) { return a > 0 ? a : -a; }
static inline bool zfeq(float a, float b, float eps) { return zfabs(a - b) < eps; }
} // namespace iflytop

2
os/zos.hpp

@ -15,6 +15,8 @@
#include "zos_thread.hpp"
//
#include "zos_schduler.hpp"
//
#include "zmath.hpp"
extern "C" {
typedef struct {
uint32_t __reserved0;

Loading…
Cancel
Save