ToyGine2 26.2.0
Game Engine for retro consoles
Loading...
Searching...
No Matches
vector2.inl File Reference

Inline implementations for toy::math::Vector2. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  toy
 Root namespace containing all engine modules.
namespace  toy::math
 Mathematical types, constants, and utilities: fixed-point, vectors, point.

Functions

template<Vector2Component T>
constexpr Vector2< T > toy::math::operator- (const Vector2< T > &vector) noexcept
 Unary minus: negated components.
template<Vector2Component T>
constexpr Vector2< T > toy::math::operator+ (const Vector2< T > &left, const Vector2< T > &right) noexcept
 Addition of two vectors.
template<Vector2Component T>
constexpr Vector2< T > toy::math::operator- (const Vector2< T > &left, const Vector2< T > &right) noexcept
 Subtraction of two vectors.
template<Vector2Component T>
constexpr Vector2< T > toy::math::operator* (const Vector2< T > &left, const T &right) noexcept
 Vector scaled by scalar.
template<Vector2Component T>
constexpr Vector2< T > toy::math::operator* (const T &left, const Vector2< T > &right) noexcept
 Vector scaled by scalar (scalar on the left).
template<Vector2Component T>
constexpr T toy::math::operator* (const Vector2< T > &left, const Vector2< T > &right) noexcept
 Dot product of two vectors.
template<Vector2Component T>
constexpr Vector2< T > toy::math::operator/ (const Vector2< T > &left, const T &right) noexcept
 Vector divided by scalar.
template<Vector2Component T>
constexpr bool toy::math::operator== (const Vector2< T > &left, const Vector2< T > &right) noexcept
 Exact equality of two vectors.
template<Vector2Component T>
constexpr bool toy::math::operator!= (const Vector2< T > &left, const Vector2< T > &right) noexcept
 Inequality of two vectors.
template<Vector2Component T>
constexpr T toy::math::cross (const Vector2< T > &left, const Vector2< T > &right) noexcept
 2D cross product (scalar result).

Detailed Description

Inline implementations for toy::math::Vector2.

Note
Included by math.hpp only; do not include this file directly.