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

Double-precision 2D vector. More...

#include <Math.h>

+ Inheritance diagram for FxVec2d:
+ Collaboration diagram for FxVec2d:

Public Member Functions

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

Detailed Description

Double-precision 2D vector.

Definition at line 102 of file Math.h.

Constructor & Destructor Documentation

◆ FxVec2d()

FxVec2d::FxVec2d ( double  a)
inlineexplicit

Definition at line 108 of file Math.h.

Member Function Documentation

◆ cross()

double FxVec2d::cross ( const FxVec2d &  other) const
inline

Definition at line 144 of file Math.h.

◆ perp()

FxVec2d FxVec2d::perp ( ) const
inline

Definition at line 147 of file Math.h.

◆ perpCW()

FxVec2d FxVec2d::perpCW ( ) const
inline

Definition at line 151 of file Math.h.

◆ rotate()

FxVec2d FxVec2d::rotate ( double  theta) const
inlinenoexcept

Definition at line 138 of file Math.h.

◆ rotate_inplace()

FxVec2d & FxVec2d::rotate_inplace ( double  degrees)
inlinenoexcept

Definition at line 132 of file Math.h.

◆ rotate_inplace_rad()

FxVec2d & FxVec2d::rotate_inplace_rad ( double  theta)
inlinenoexcept

Definition at line 123 of file Math.h.

◆ rotate_rad()

FxVec2d FxVec2d::rotate_rad ( double  theta) const
inlinenoexcept

Definition at line 139 of file Math.h.

◆ set_x()

void FxVec2d::set_x ( double  val)
inline

Definition at line 119 of file Math.h.

◆ set_y()

void FxVec2d::set_y ( double  val)
inline

Definition at line 120 of file Math.h.

◆ x() [1/2]

double & FxVec2d::x ( )
inline

Definition at line 111 of file Math.h.

◆ x() [2/2]

double FxVec2d::x ( ) const
inline

Definition at line 115 of file Math.h.

◆ y() [1/2]

double & FxVec2d::y ( )
inline

Definition at line 112 of file Math.h.

◆ y() [2/2]

double FxVec2d::y ( ) const
inline

Definition at line 116 of file Math.h.


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