PhysicsBasedAnimationToolkit 0.0.10
Cross-platform C++20 library of algorithms and data structures commonly used in computer graphics research on physically-based simulation.
Loading...
Searching...
No Matches
Rational.h File Reference

Fixed size rational number representation using std::int64_t as numerator and denominator. More...

#include "PhysicsBasedAnimationToolkitExport.h"
#include <cstdint>
#include <pbat/Aliases.h>
#include <tuple>

Go to the source code of this file.

Classes

struct  pbat::math::Rational
 Fixed size rational number \( \frac{a}{b} \) using std::int64_t for numerator and denominator. More...
 

Namespaces

namespace  pbat
 The main namespace of the library.
 
namespace  pbat::math
 Math related functionality.
 

Functions

template<std::integral Integer>
Rational pbat::math::operator- (Integer a, Rational const &b)
 Subtraction operation between Rational and integral type.
 
template<std::integral Integer>
Rational pbat::math::operator+ (Integer a, Rational const &b)
 Addition operation between Rational and integral type.
 
template<std::integral Integer>
Rational pbat::math::operator* (Integer a, Rational const &b)
 Multiplication operation between Rational and integral type.
 
template<std::integral Integer>
Rational pbat::math::operator/ (Integer a, Rational const &b)
 Division operation between Rational and integral type.
 

Detailed Description

Fixed size rational number representation using std::int64_t as numerator and denominator.

Author
Quoc-Minh Ton-That (tonth.nosp@m.at.q.nosp@m.uocmi.nosp@m.nh@g.nosp@m.mail..nosp@m.com)
Date
2025-02-11