Subastra
Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs | Functions
vec2.h File Reference
#include "defs.h"
#include <math.h>
Include dependency graph for vec2.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  vec2
 

Macros

#define VEC2_EPSILON   1e-7
 The vectors of this length and smaller are considered 0.
 

Typedefs

typedef vec2 norm2
 Normalized vector. Does not do any work to uphold a variants, just is more type-safe. If a function returns a norm2 it must be normalized.
 

Functions

static vec2 vec2_new (float x, float y)
 {.x = x, .y = y}
 
static vec2 vec2_zero ()
 {.x = 0, .y = 0}
 

Macro Definition Documentation

◆ VEC2_EPSILON

#define VEC2_EPSILON   1e-7

The vectors of this length and smaller are considered 0.

Typedef Documentation

◆ norm2

typedef vec2 norm2

Normalized vector. Does not do any work to uphold a variants, just is more type-safe. If a function returns a norm2 it must be normalized.

Function Documentation

◆ vec2_new()

static vec2 vec2_new ( float  x,
float  y 
)
static

{.x = x, .y = y}

◆ vec2_zero()

static vec2 vec2_zero ( )
static

{.x = 0, .y = 0}