-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsubtract_triangle.h
More file actions
73 lines (62 loc) · 1.34 KB
/
subtract_triangle.h
File metadata and controls
73 lines (62 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#if !defined(SUBTRACT_TRIANGLE_H)
/* ========================================================================
$File: $
$Date: 2024 $
$Revision: $
$Creator: BabyKaban $
$Notice: $
======================================================================== */
#include <stdint.h>
#include <stddef.h>
#include <limits.h>
#include <float.h>
typedef int8_t s8;
typedef int16_t s16;
typedef int32_t s32;
typedef int64_t s64;
typedef s32 b32;
typedef uint8_t u8;
typedef uint16_t u16;
typedef uint32_t u32;
typedef uint64_t u64;
typedef float f32;
typedef double f64;
union v2
{
struct
{
f32 x, y;
};
struct
{
f32 u, v;
};
f32 E[2];
};
#define internal static
struct sort_entry
{
f32 SortKey;
u32 Index;
};
inline void *
Copy(u32 Size, void *SourceInit, void *DestInit)
{
u8 *Source = (u8 *)SourceInit;
u8 *Dest = (u8 *)DestInit;
while(Size--) {*Dest++ = *Source++;}
return(DestInit);
}
#define ZeroStruct(Instance) ZeroSize(sizeof(Instance), &(Instance))
#define ZeroArray(Count, Pointer) ZeroSize(Count*sizeof((Pointer)[0]), Pointer)
inline void
ZeroSize(u32 Size, void *Ptr)
{
u8 *Byte = (u8 *)Ptr;
while(Size--)
{
*Byte++ = 0;
}
}
#define SUBTRACT_TRIANGLE_H
#endif