FOUND
Loading...
Searching...
No Matches
found::Vec2 Struct Reference

A Vec2 is an immutable object that represents a 2D Vector. More...

#include <attitude-utils.hpp>

Public Member Functions

decimal Magnitude () const
 Provides the magnitude of this Vec2.
 
decimal MagnitudeSq () const
 Provides the square of the magnitude of this Vec2.
 
Vec2 Normalize () const
 Normalizes this.
 
decimal operator* (const Vec2 &) const
 Dot product (Scalar product)
 
Vec2 operator* (const decimal &) const
 Scalar-vector Product.
 
Vec2 operator- (const Vec2 &) const
 Vector Subtraction.
 
Vec2 operator+ (const Vec2 &) const
 Vector Addition.
 

Public Attributes

decimal x
 The x coordinate.
 
decimal y
 The y coordinate.
 

Detailed Description

A Vec2 is an immutable object that represents a 2D Vector.

Member Function Documentation

◆ Magnitude()

decimal found::Vec2::Magnitude ( ) const

Provides the magnitude of this Vec2.

Returns
The magnitude of this

◆ MagnitudeSq()

decimal found::Vec2::MagnitudeSq ( ) const

Provides the square of the magnitude of this Vec2.

Returns
The square of the magnitude of this

◆ Normalize()

Vec2 found::Vec2::Normalize ( ) const

Normalizes this.

Returns
The normalized vector of this

◆ operator*() [1/2]

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

Scalar-vector Product.

◆ operator*() [2/2]

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

Dot product (Scalar product)

◆ operator+()

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

Vector Addition.

◆ operator-()

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

Vector Subtraction.

Member Data Documentation

◆ x

decimal found::Vec2::x

The x coordinate.

◆ y

decimal found::Vec2::y

The y coordinate.


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