Subastra
Loading...
Searching...
No Matches
Macros | Functions | Variables
physics.c File Reference
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include "../arena.h"
#include "../defs.h"
#include "../physics/sat.h"
Include dependency graph for physics.c:

Macros

#define EPSILON   1e-4
 

Functions

void _test_setup ()
 
void _test_cleanup ()
 
static bool almost_equal (float a, float b)
 
void _test_two_triangles_intersecting ()
 
void _test_two_triangles_non_intersecting ()
 
void _test_two_squares_partial_overlap ()
 
void _test_corner_touching_squares ()
 
void _test_triangles_sharing_edge ()
 
void _test_identical_triangles ()
 

Variables

int _test_count = 6
 
const char * _tests []
 

Macro Definition Documentation

◆ EPSILON

#define EPSILON   1e-4

Function Documentation

◆ _test_cleanup()

void _test_cleanup ( )

◆ _test_corner_touching_squares()

void _test_corner_touching_squares ( )

◆ _test_identical_triangles()

void _test_identical_triangles ( )

◆ _test_setup()

void _test_setup ( )

◆ _test_triangles_sharing_edge()

void _test_triangles_sharing_edge ( )

◆ _test_two_squares_partial_overlap()

void _test_two_squares_partial_overlap ( )

◆ _test_two_triangles_intersecting()

void _test_two_triangles_intersecting ( )

◆ _test_two_triangles_non_intersecting()

void _test_two_triangles_non_intersecting ( )

◆ almost_equal()

static bool almost_equal ( float  a,
float  b 
)
static

Variable Documentation

◆ _test_count

int _test_count = 6

◆ _tests

const char* _tests[]
Initial value:
= {
"_test_two_triangles_intersecting", "_test_two_triangles_non_intersecting",
"_test_two_squares_partial_overlap", "_test_corner_touching_squares",
"_test_triangles_sharing_edge", "_test_identical_triangles",
}