GPR5100 - Rollback
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
core::Vec2f Struct Reference

Vec2f is a utility class that represents a mathematical 2d vector. More...

#include <vec2.h>

Public Member Functions

constexpr Vec2f (float newX, float newY)
 
 Vec2f (sf::Vector2f v)
 
float GetMagnitude () const
 
void Normalize ()
 
Vec2f GetNormalized () const
 
float GetSqrMagnitude () const
 
Vec2f Rotate (Degree rotation) const
 
 operator sf::Vector2f () const
 
Vec2f operator+ (Vec2f v) const
 
Vec2foperator+= (Vec2f v)
 
Vec2f operator- (Vec2f v) const
 
Vec2foperator-= (Vec2f v)
 
Vec2f operator* (float f) const
 
Vec2f operator/ (float f) const
 

Static Public Member Functions

static float Dot (Vec2f a, Vec2f b)
 
static Vec2f Lerp (Vec2f a, Vec2f b, float t)
 
static constexpr Vec2f zero ()
 
static constexpr Vec2f one ()
 
static constexpr Vec2f up ()
 
static constexpr Vec2f down ()
 
static constexpr Vec2f left ()
 
static constexpr Vec2f right ()
 

Public Attributes

float x = 0.0f
 
float y = 0.0f
 

Detailed Description

Vec2f is a utility class that represents a mathematical 2d vector.


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