LOST  0.0.1
LOST: Open-source Star Tracker
lost::Vec2 Struct Reference

A two dimensional vector with decimaling point components. More...

#include <attitude-utils.hpp>

Public Member Functions

decimal Magnitude () const
 
decimal MagnitudeSq () const
 The square of the magnitude. More...
 
Vec2 Normalize () const
 
decimal operator* (const Vec2 &) const
 
Vec2 operator* (const decimal &) const
 Vector-Scalar multiplication. More...
 
Vec2 operator- (const Vec2 &) const
 Usual vector subtraction. More...
 
Vec2 operator+ (const Vec2 &) const
 Usual vector addition. More...
 

Public Attributes

decimal x
 
decimal y
 

Detailed Description

A two dimensional vector with decimaling point components.

Definition at line 17 of file attitude-utils.hpp.

Member Function Documentation

◆ Magnitude()

decimal lost::Vec2::Magnitude ( ) const

Definition at line 188 of file attitude-utils.cpp.

◆ MagnitudeSq()

decimal lost::Vec2::MagnitudeSq ( ) const

The square of the magnitude.

Definition at line 180 of file attitude-utils.cpp.

◆ Normalize()

Vec2 lost::Vec2::Normalize ( ) const

◆ operator*() [1/2]

Vec2 lost::Vec2::operator* ( const decimal other) const

Vector-Scalar multiplication.

Definition at line 206 of file attitude-utils.cpp.

◆ operator*() [2/2]

decimal lost::Vec2::operator* ( const Vec2 ) const

◆ operator+()

Vec2 lost::Vec2::operator+ ( const Vec2 other) const

Usual vector addition.

Definition at line 216 of file attitude-utils.cpp.

◆ operator-()

Vec2 lost::Vec2::operator- ( const Vec2 other) const

Usual vector subtraction.

Definition at line 221 of file attitude-utils.cpp.

Member Data Documentation

◆ x

decimal lost::Vec2::x

Definition at line 18 of file attitude-utils.hpp.

◆ y

decimal lost::Vec2::y

Definition at line 19 of file attitude-utils.hpp.


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