unmoving  v0.1.0
More convenient fixed-point arithmetic for the Sony PlayStation
Classes | Namespaces | Functions
PSXFixed.hpp File Reference

This file forms part of Unmoving. More...

#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
Include dependency graph for PSXFixed.hpp:

Go to the source code of this file.

Classes

class  PSXFixed
 PSXFixed-point arithmetic value type for Sony PlayStation. More...
 

Namespaces

 unmoving
 

Functions

constexpr PSXFixed operator""_fx (long double literal)
 User-defined literal for PSXFixed objects with fractional parts. More...
 
constexpr PSXFixed operator""_fx (unsigned long long int literal)
 User-defined literal for PSXFixed objects without fractional parts. More...
 

Detailed Description

This file forms part of Unmoving.

Unmoving is a C++ header-only library providing more convenient fixed-point arithmetic for the Sony PlayStation ("PS1"), in the form of a C++ class that wraps the native integer type used by the console standard library for performing fixed-point calculations. This class is intended to remove much of the more tedious aspects of the boilerplate code required to handle numbers in this way. The author hopes that it is useful.

Warning
Performance testing has not been done either in emulators or real PlayStation hardware. Although effort has been made to make this code efficient, at this stage this cannot be guaranteed, particularly with multiplication or division between two PSXFixed instances.
Author
Joshua Saxby joshu.nosp@m.a.a..nosp@m.saxby.nosp@m.@gma.nosp@m.il.co.nosp@m.m
Date
September 2021