LOST 0.0.1
LOST: Open-source Star Tracker
Loading...
Searching...
No Matches
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.
Vec2 Normalize () const
decimal operator* (const Vec2 &) const
Vec2 operator* (const decimal &) const
 Vector-Scalar multiplication.
Vec2 operator- (const Vec2 &) const
 Usual vector subtraction.
Vec2 operator+ (const Vec2 &) const
 Usual vector addition.

Public Attributes

decimal x
decimal y

Friends

std::ostream & operator<< (std::ostream &output, const Vec2 &vec)

Detailed Description

A two dimensional vector with decimaling point components.

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

Member Function Documentation

◆ Magnitude()

decimal lost::Vec2::Magnitude ( ) const

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

◆ MagnitudeSq()

decimal lost::Vec2::MagnitudeSq ( ) const

The square of the magnitude.

Definition at line 190 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 216 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 226 of file attitude-utils.cpp.

◆ operator-()

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

Usual vector subtraction.

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

◆ operator<<

std::ostream & operator<< ( std::ostream & output,
const Vec2 & vec )
friend

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

Member Data Documentation

◆ x

decimal lost::Vec2::x

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

◆ y

decimal lost::Vec2::y

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


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