Fx2D
A C++20 2D rigid-body physics engine
Loading...
Searching...
No Matches
FxVec2f Class Reference

Single-precision 2D vector. More...

#include <Math.h>

+ Inheritance diagram for FxVec2f:
+ Collaboration diagram for FxVec2f:

Public Member Functions

 FxVec2f (float a)
 
float & x ()
 
float & y ()
 
float x () const
 
float y () const
 
void set_x (float val)
 
void set_y (float val)
 
FxVec2f & rotate_inplace_rad (float theta) noexcept
 
FxVec2f & rotate_inplace (float degrees) noexcept
 
FxVec2f rotate (float theta) const noexcept
 
FxVec2f rotate_rad (float theta) const noexcept
 
float cross (const FxVec2f &other) const
 
FxVec2f perp () const
 
FxVec2f perpCW () const
 

Detailed Description

Single-precision 2D vector.

Definition at line 47 of file Math.h.

Constructor & Destructor Documentation

◆ FxVec2f()

FxVec2f::FxVec2f ( float  a)
inlineexplicit

Definition at line 53 of file Math.h.

Member Function Documentation

◆ cross()

float FxVec2f::cross ( const FxVec2f &  other) const
inline

Definition at line 89 of file Math.h.

◆ perp()

FxVec2f FxVec2f::perp ( ) const
inline

Definition at line 92 of file Math.h.

◆ perpCW()

FxVec2f FxVec2f::perpCW ( ) const
inline

Definition at line 96 of file Math.h.

◆ rotate()

FxVec2f FxVec2f::rotate ( float  theta) const
inlinenoexcept

Definition at line 83 of file Math.h.

◆ rotate_inplace()

FxVec2f & FxVec2f::rotate_inplace ( float  degrees)
inlinenoexcept

Definition at line 77 of file Math.h.

◆ rotate_inplace_rad()

FxVec2f & FxVec2f::rotate_inplace_rad ( float  theta)
inlinenoexcept

Definition at line 68 of file Math.h.

◆ rotate_rad()

FxVec2f FxVec2f::rotate_rad ( float  theta) const
inlinenoexcept

Definition at line 84 of file Math.h.

◆ set_x()

void FxVec2f::set_x ( float  val)
inline

Definition at line 64 of file Math.h.

◆ set_y()

void FxVec2f::set_y ( float  val)
inline

Definition at line 65 of file Math.h.

◆ x() [1/2]

float & FxVec2f::x ( )
inline

Definition at line 56 of file Math.h.

◆ x() [2/2]

float FxVec2f::x ( ) const
inline

Definition at line 60 of file Math.h.

◆ y() [1/2]

float & FxVec2f::y ( )
inline

Definition at line 57 of file Math.h.

◆ y() [2/2]

float FxVec2f::y ( ) const
inline

Definition at line 61 of file Math.h.


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