le2d v0.4.6
2D game engine framework
 
Loading...
Searching...
No Matches
le::nvec2 Class Reference

Normalized 2D vector. More...

#include <le2d/nvec2.hpp>

Inheritance diagram for le::nvec2:

Public Member Functions

explicit(false) nvec2(glm explicit (false) nvec2(float x
 
auto to_radians () const -> float
 
auto rotated (float radians) const -> nvec2
 
void rotate (float radians)
 

Static Public Member Functions

static auto normal_or (glm::vec2 xy, glm::vec2 fallback) -> nvec2
 

Public Attributes

explicit(false) nvec2(glm float y: nvec2(glm::vec2{x
 

Detailed Description

Normalized 2D vector.

Member Function Documentation

◆ explicit()

le::nvec2::explicit ( false  )
Initial value:
{}
auto operator-() const -> nvec2 { return {InPlace{}, {-x, -y}}; }
static auto from_radians(float r) -> nvec2
Normalized 2D vector.
Definition nvec2.hpp:11
explicit(false) nvec2(glm float y
Definition nvec2.hpp:16

◆ normal_or()

static auto le::nvec2::normal_or ( glm::vec2  xy,
glm::vec2  fallback 
) -> nvec2
static

◆ rotate()

void le::nvec2::rotate ( float  radians)

◆ rotated()

auto le::nvec2::rotated ( float  radians) const -> nvec2

◆ to_radians()

auto le::nvec2::to_radians ( ) const -> float

Member Data Documentation

◆ y

explicit(false) nvec2(glm float le::nvec2::y
Initial value:
{}
auto operator-() const -> nvec2 { return {InPlace{}, {-x, -y}}; }
static auto from_radians(float r) -> nvec2

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