shz_remquof
SHZ_INLINE float shz_remquof(float num, float denom, float* quot) SHZ_NOEXCEPT;(Sorta) Replacement for the <math.h> routine, remquof().
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
num | float | |
denom | float | |
quot | float * |
Returns
Section titled “Returns”float
Details
Section titled “Details”Returns the floating-point remainder of num divided by denom, rounded to the nearest integer (as a float). quot is set equal to the quotient which is used as part of the calculation.
quotis returning as afloatrather than anintas with standard C. Simply cast to anintmanually afterwards if that is the desired behavior.
Warnings
Section titled “Warnings”- This routine does not gracefully handle dividing by zero.
Availability
Section titled “Availability”- C++ equivalent:
shz::remquof - Type-generic form: none
- Back-ends: SH4: shared C implementation · SW: portable C · SPU: shared C implementation
- Defined in:
sh4zam/shz_scalar.h:154 - Module: Scalar, section "Rounding"