ToyGine2 26.2.0
Game Engine for retro consoles
Loading...
Searching...
No Matches
point.hpp File Reference

2D integer point for UI and input coordinates. More...

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

Go to the source code of this file.

Classes

class  toy::math::Point
 2D integer point for UI and input coordinates. More...

Namespaces

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

Concepts

concept  toy::math::PointScalar
 Concept satisfied when T is a signed integral, floating-point, or fixed-point type.

Functions

constexpr Point toy::math::operator- (const Point &point) noexcept
 Unary minus: negated coordinates.
constexpr Point toy::math::operator+ (const Point &left, const Point &right) noexcept
 Addition of two points.
constexpr Point toy::math::operator- (const Point &left, const Point &right) noexcept
 Subtraction of two points.
template<PointScalar T>
constexpr Point toy::math::operator* (const Point &point, const T &scalar) noexcept
 Point scaled by scalar and truncated to integer.
template<PointScalar T>
constexpr Point toy::math::operator* (const T &scalar, const Point &point) noexcept
 Point scaled by scalar (scalar on the left).
template<PointScalar T>
constexpr Point toy::math::operator/ (const Point &point, const T &scalar) noexcept
 Point divided by scalar and truncated to integer.
constexpr bool toy::math::operator== (const Point &left, const Point &right) noexcept
 Exact equality of two points.

Detailed Description

2D integer point for UI and input coordinates.

Defines toy::math::Point.

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