dEngine
Simple 2D C++ game engine
Public Member Functions | Public Attributes | List of all members
dengine::Vec2 Class Reference

A vector composed of two points. More...

#include <Vec2.h>

Public Member Functions

 Vec2 ()
 Create a new Vec2. More...
 
 Vec2 (float x, float y)
 Create a new Vec2 at the specified points. More...
 

Public Attributes

float x
 X position of the vector. More...
 
float y
 Y position of the vector. More...
 

Detailed Description

A vector composed of two points.

Constructor & Destructor Documentation

◆ Vec2() [1/2]

Vec2::Vec2 ( )

Create a new Vec2.

◆ Vec2() [2/2]

Vec2::Vec2 ( float  x,
float  y 
)

Create a new Vec2 at the specified points.

Parameters
xThe x position of the vector
yThe y position of the vector

Member Data Documentation

◆ x

float dengine::Vec2::x

X position of the vector.

Referenced by dengine::Collider::Update().

◆ y

float dengine::Vec2::y

Y position of the vector.

Referenced by dengine::Collider::Update().