GREM 3.12.0
Game/Rendering Engine Modules for C++
Loading...
Searching...
No Matches
grem::physics::Zero Struct Reference

Abstract physical quantity representing the origin of the global world space reference frame, or the relative value 0 of any unit. More...

#include <GREM/physics/quantities.hpp>

Public Member Functions

GREM_ALWAYS_INLINE consteval Zero (float value)
 Explicitly construct a zero from a compile-time float.
GREM_ALWAYS_INLINE consteval Zero (double value)
 Explicitly construct a zero from a compile-time double.
GREM_ALWAYS_INLINE consteval Zero (int value)
 Explicitly construct a zero from a compile-time int.
GREM_ALWAYS_INLINE consteval Zero (Zero *value)
 Implicitly convert a compile-time 0 literal to a zero.

Detailed Description

Abstract physical quantity representing the origin of the global world space reference frame, or the relative value 0 of any unit.

Designed to be implicitly convertible from a 0 literal, or constructed from a compile-time value of 0, but nothing else.

Constructor & Destructor Documentation

◆ Zero() [1/4]

GREM_ALWAYS_INLINE consteval grem::physics::Zero::Zero ( float value)
inlineexplicitconsteval

Explicitly construct a zero from a compile-time float.

Parameters
valuevalue to construct the zero from. Must be equal to 0.0f.
Exceptions
physics::Errorif the value is not equal to 0.0f.

◆ Zero() [2/4]

GREM_ALWAYS_INLINE consteval grem::physics::Zero::Zero ( double value)
inlineexplicitconsteval

Explicitly construct a zero from a compile-time double.

Parameters
valuevalue to construct the zero from. Must be equal to 0.0.
Exceptions
physics::Errorif the value is not equal to 0.0.

◆ Zero() [3/4]

GREM_ALWAYS_INLINE consteval grem::physics::Zero::Zero ( int value)
inlineexplicitconsteval

Explicitly construct a zero from a compile-time int.

Parameters
valuevalue to construct the zero from. Must be equal to 0.
Exceptions
physics::Errorif the value is not equal to 0.

◆ Zero() [4/4]

GREM_ALWAYS_INLINE consteval grem::physics::Zero::Zero ( Zero * value)
inlineconsteval

Implicitly convert a compile-time 0 literal to a zero.

This constructor will match 0 literals since the C++ standard has a special case where a literal 0 may implicitly convert to a null pointer, whereas other integer values may not.

Parameters
valuea literal 0. Must be equal to nullptr.
Exceptions
physics::Errorif the value is not equal to nullptr.

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