fixed_math

Multiplication in FixedMath

The FixedMath library provides detailed functionality for performing multiplication operations on fixed-point numbers (fixed_t), integrating precision management and type safety into its core design.

Core Multiplication Functionality

Safety Checks

Template Specializations for Multiplication

Multiplication Operator Overloads

Usage

fixed_t a = ...; // Initialize with some value
fixed_t b = ...; // Initialize with another value

fixed_t result1 = a * b; // Multiplication of two fixed_t values

int scalar = 5;
fixed_t result2 = a * scalar; // Multiplication by an integral scalar

double d = 2.0;
auto result3 = a * d; // Multiplication with a double, result is promoted to double