+/rtos

git clone https://git.julia.blue/+/rtos

Joseph RyanAdd trig and mouse circling822d761

master
1.2 KiB35 linesraw
1#pragma once
2
3#include <stdbool.h>
4#include <stdint.h>
5
6typedef uint32_t size_t;
7
8#define PI 3.14159265f
9
10int32_t abs(int32_t n);
11float sin(float x);
12float cos(float x);
13uint32_t difference(uint32_t a, uint32_t b);
14int32_t min(int32_t a, int32_t b);
15int32_t max(int32_t a, int32_t b);
16bool streq(const char* a, const char* b);
17uint16_t strlen(const char* s);
18int16_t find(const char* s, char c);
19bool is_whitespace(char c);
20bool is_numeric_char(const char c);
21bool is_numeric_str(const char* c);
22#define is_numeric(X)                                                          \
23    ((_Generic((X), char : is_numeric_char, char* : is_numeric_str))(X))
24int32_t atoi(char* s);
25char* reverse(char* s);
26char* itoa(int32_t value, char* buf, uint8_t radix);
27void memcpy(void* dest, const void* src, uint32_t n);
28void memset(void* dest, uint8_t value, uint32_t n);
29int memcmp(const void* s1, const void* s2, uint32_t n);
30char* strcpy(char* dest, const char* src);
31char* strchr(const char* str, int c);
32size_t strspn(const char* str1, const char* str2);
33size_t strcspn(const char* str1, const char* str2);
34int8_t strncmp(const char* str1, const char* str2, size_t num);
35char* strstr(char* str1, const char* str2);