My Project
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
found::Vec2 Struct Reference

#include <attitude-utils.hpp>

Public Member Functions

decimal Magnitude () const
 
decimal MagnitudeSq () const
 
Vec2 Normalize () const
 
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

const decimal x
 The x coordinate.
 
const 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

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