crisp-game-lib-arduboy
Functions
vector.c File Reference

Functions

Vector * vectorSet (Vector *vec, float x, float y)
 
Vector * vectorAdd (Vector *vec, float x, float y)
 
Vector * vectorMul (Vector *vec, float v)
 
Vector * rotate (Vector *vec, float angle)
 
Vector * addWithAngle (Vector *vec, float angle, float length)
 
float angleTo (Vector *vec, float x, float y)
 
float distanceTo (Vector *vec, float x, float y)
 
float vectorAngle (Vector *vec)
 
float vectorLength (Vector *vec)
 

Function Documentation

◆ addWithAngle()

Vector * addWithAngle ( Vector *  vec,
float  angle,
float  length 
)

◆ angleTo()

float angleTo ( Vector *  vec,
float  x,
float  y 
)

◆ distanceTo()

float distanceTo ( Vector *  vec,
float  x,
float  y 
)

◆ rotate()

Vector * rotate ( Vector *  vec,
float  angle 
)

◆ vectorAdd()

Vector * vectorAdd ( Vector *  vec,
float  x,
float  y 
)

◆ vectorAngle()

float vectorAngle ( Vector *  vec)

◆ vectorLength()

float vectorLength ( Vector *  vec)

◆ vectorMul()

Vector * vectorMul ( Vector *  vec,
float  v 
)

◆ vectorSet()

Vector * vectorSet ( Vector *  vec,
float  x,
float  y 
)