scop
a small 3D object loader
Loading...
Searching...
No Matches
vec2 Class Reference

#include <Math.hpp>

Collaboration diagram for vec2:

Public Member Functions

 vec2 ()
 
 vec2 (float _x, float _y)
 
vec2 operator+ (const vec2 &other) const
 
vec2 operator- (const vec2 &other) const
 
vec2 operator* (float scalar) const
 
vec2 operator/ (float scalar) const
 
float dot (const vec2 &other) const
 
float length () const
 
vec2 normalize () const
 

Public Attributes

float x
 
float y
 

Detailed Description

Definition at line 19 of file Math.hpp.

Constructor & Destructor Documentation

◆ vec2() [1/2]

vec2::vec2 ( )
inline

Definition at line 24 of file Math.hpp.

Here is the caller graph for this function:

◆ vec2() [2/2]

vec2::vec2 ( float _x,
float _y )
inline

Definition at line 25 of file Math.hpp.

Member Function Documentation

◆ dot()

float vec2::dot ( const vec2 & other) const
inline

Definition at line 46 of file Math.hpp.

◆ length()

float vec2::length ( ) const
inline

Definition at line 51 of file Math.hpp.

Here is the caller graph for this function:

◆ normalize()

vec2 vec2::normalize ( ) const
inline

Definition at line 56 of file Math.hpp.

Here is the call graph for this function:

◆ operator*()

vec2 vec2::operator* ( float scalar) const
inline

Definition at line 36 of file Math.hpp.

Here is the call graph for this function:

◆ operator+()

vec2 vec2::operator+ ( const vec2 & other) const
inline

Definition at line 28 of file Math.hpp.

Here is the call graph for this function:

◆ operator-()

vec2 vec2::operator- ( const vec2 & other) const
inline

Definition at line 32 of file Math.hpp.

Here is the call graph for this function:

◆ operator/()

vec2 vec2::operator/ ( float scalar) const
inline

Definition at line 40 of file Math.hpp.

Here is the call graph for this function:

Member Data Documentation

◆ x

float vec2::x

Definition at line 21 of file Math.hpp.

◆ y

float vec2::y

Definition at line 21 of file Math.hpp.


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