Overload List
| # | Signature | Description |
|---|---|---|
| 1 | TCplx Rem(TCplx X, TCplx Y) | Complex remainder after division. |
| 2 | TSCplx Rem(TSCplx X, TSCplx Y) | |
| 3 | Double Rem(Double X, Double Y) | IEEE 754 floating-point remainder (fmod). |
| 4 | Single Remf(Single X, Single Y) |
Overload 1: TCplx Rem(TCplx X, TCplx Y)
Complex remainder after division.
Returns: TCplx (complex) - The remainder after complex division: X/Y. Applied component-wise.
Overload 2: TSCplx Rem(TSCplx X, TSCplx Y)
Overload 3: Double Rem(Double X, Double Y)
IEEE 754 floating-point remainder (fmod).
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | Double | scalar |
| 2 | Y | Double | scalar |
Returns: Double - The exact remainder of X/Y, with |result| < |Y| and same sign as X.
Computes X - trunc(X/Y) * Y with no rounding error (IEEE 754 exact operation). General-purpose modular arithmetic for arbitrary divisor Y - use for clock wrapping, spatial tiling, fractional part extraction, or any case where you need the exact numerical value of the remainder in a guaranteed range.
Not suitable for angle reduction before trigonometric functions. Sin, Cos and Tan handle large arguments internally using Payne-Hanek range reduction with extended-precision constants - calling Rem(x, 2*Pi) beforehand does not improve their accuracy and can degrade it for large |x|.
Overload 4: Single Remf(Single X, Single Y)
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | Single | scalar |
| 2 | Y | Single | scalar |
Returns: Single