Flint Engine
Modular C++20 2D game engine powered by SDL3
Loading...
Searching...
No Matches
Flint::Vec2< T > Struct Template Reference

Generic 2-D vector with arithmetic operators. More...

#include <flint/math/types.h>

+ Collaboration diagram for Flint::Vec2< T >:

Public Member Functions

Vec2 operator+ (T scalar)
 
Vec2 operator+ (const Vec2 &other) const
 
Vec2 operator- (T scalar)
 
Vec2 operator- (const Vec2 &other) const
 
Vec2 operator* (T scalar) const
 
Vec2 operator* (const Vec2 &other) const
 
Vec2 operator/ (T scalar) const
 
Vec2 operator/ (const Vec2 &other) const
 
Vec2 & operator+= (const Vec2 &other)
 
Vec2 & operator-= (const Vec2 &other)
 
Vec2 & operator*= (T scalar)
 
Vec2 & operator/= (T scalar)
 
bool operator== (const Vec2 &other) const =default
 

Public Attributes

T x
 
T y
 

Detailed Description

template<typename T>
struct Flint::Vec2< T >

Generic 2-D vector with arithmetic operators.

Template Parameters
TElement type (typically int or float).

Definition at line 16 of file types.h.


The documentation for this struct was generated from the following file: