Euphoria
eu::vec2f Struct Reference

#include <vec2.h>

Public Member Functions

 vec2f ()=default
 
constexpr vec2f (float ax, float ay)
 
 vec2f (const std::tuple< float, float > &a)
 
 vec2f (const unit2f &u)
 
float * get_data_ptr ()
 
float normalize ()
 
vec2f get_rotated (const Angle &a) const
 
const float * get_data_ptr () const
 
vec2i to_i () const
 
vec2f get_flipped_y () const
 
float get_length_squared () const
 
float get_length () const
 
NormalizedAndLength< unit2f, float > get_normalized_and_length () const
 
unit2f get_normalized () const
 
void operator+= (const vec2f &rhs)
 
void operator-= (const vec2f &rhs)
 
vec2f operator- () const
 
void operator/= (float rhs)
 
void operator*= (float rhs)
 

Static Public Member Functions

static vec2f from_to (const vec2f &from, const vec2f &to)
 

Public Attributes

float x
 
float y
 

Detailed Description

Definition at line 32 of file vec2.h.

Constructor & Destructor Documentation

◆ vec2f() [1/4]

eu::vec2f::vec2f ( )
default

◆ vec2f() [2/4]

constexpr eu::vec2f::vec2f ( float  ax,
float  ay 
)
inlineconstexpr

Definition at line 38 of file vec2.h.

◆ vec2f() [3/4]

eu::vec2f::vec2f ( const std::tuple< float, float > &  a)
explicit

Definition at line 10 of file vec2.cc.

◆ vec2f() [4/4]

eu::vec2f::vec2f ( const unit2f u)
explicit

Definition at line 16 of file vec2.cc.

Member Function Documentation

◆ from_to()

vec2f eu::vec2f::from_to ( const vec2f from,
const vec2f to 
)
static

Definition at line 83 of file vec2.cc.

◆ get_data_ptr() [1/2]

float * eu::vec2f::get_data_ptr ( )

Definition at line 30 of file vec2.cc.

◆ get_data_ptr() [2/2]

const float * eu::vec2f::get_data_ptr ( ) const

Definition at line 36 of file vec2.cc.

◆ get_flipped_y()

vec2f eu::vec2f::get_flipped_y ( ) const

Definition at line 50 of file vec2.cc.

◆ get_length()

float eu::vec2f::get_length ( ) const

Definition at line 103 of file vec2.cc.

◆ get_length_squared()

float eu::vec2f::get_length_squared ( ) const

Definition at line 76 of file vec2.cc.

◆ get_normalized()

unit2f eu::vec2f::get_normalized ( ) const

Definition at line 125 of file vec2.cc.

◆ get_normalized_and_length()

NormalizedAndLength< unit2f, float > eu::vec2f::get_normalized_and_length ( ) const

Definition at line 117 of file vec2.cc.

◆ get_rotated()

vec2f eu::vec2f::get_rotated ( const Angle a) const

Definition at line 42 of file vec2.cc.

◆ normalize()

float eu::vec2f::normalize ( )

Definition at line 109 of file vec2.cc.

◆ operator*=()

void eu::vec2f::operator*= ( float  rhs)

Definition at line 96 of file vec2.cc.

◆ operator+=()

void eu::vec2f::operator+= ( const vec2f rhs)

Definition at line 56 of file vec2.cc.

◆ operator-()

vec2f eu::vec2f::operator- ( ) const

Definition at line 70 of file vec2.cc.

◆ operator-=()

void eu::vec2f::operator-= ( const vec2f rhs)

Definition at line 63 of file vec2.cc.

◆ operator/=()

void eu::vec2f::operator/= ( float  rhs)

Definition at line 89 of file vec2.cc.

◆ to_i()

vec2i eu::vec2f::to_i ( ) const

Definition at line 23 of file vec2.cc.

Member Data Documentation

◆ x

float eu::vec2f::x

Definition at line 34 of file vec2.h.

◆ y

float eu::vec2f::y

Definition at line 35 of file vec2.h.


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