ASW Lib
A.D.S. Games SDL Wrapper Library. A library targeted at Allegro4 users who want to switch to SDL3 and use modern c++.
Loading...
Searching...
No Matches
anonymous_namespace{geometry.cpp} Namespace Reference

Classes

struct  Ray
 
struct  Segment
 

Functions

Vec2f rotate (const Vec2f &v, float cos_a, float sin_a)
 
float distance_to_segment (const Vec2f &p, const Vec2f &a, const Vec2f &b)
 
bool clip_segment (Vec2f &a, Vec2f &b, const Vec2f &min, const Vec2f &max)
 

Variables

constexpr float TAU = std::numbers::pi_v<float> * 2.0F
 
constexpr float CORNER_NUDGE = 0.0001F
 

Function Documentation

◆ clip_segment()

bool anonymous_namespace{geometry.cpp}::clip_segment ( Vec2f & a,
Vec2f & b,
const Vec2f & min,
const Vec2f & max )

Definition at line 48 of file geometry.cpp.

◆ distance_to_segment()

float anonymous_namespace{geometry.cpp}::distance_to_segment ( const Vec2f & p,
const Vec2f & a,
const Vec2f & b )

Definition at line 38 of file geometry.cpp.

◆ rotate()

Vec2f anonymous_namespace{geometry.cpp}::rotate ( const Vec2f & v,
float cos_a,
float sin_a )

Definition at line 33 of file geometry.cpp.

Variable Documentation

◆ CORNER_NUDGE

float anonymous_namespace{geometry.cpp}::CORNER_NUDGE = 0.0001F
constexpr

Definition at line 14 of file geometry.cpp.

◆ TAU

float anonymous_namespace{geometry.cpp}::TAU = std::numbers::pi_v<float> * 2.0F
constexpr

Definition at line 11 of file geometry.cpp.