★ SGL User's Manual ★ PROGRAMMER'S STRUCTThis chapter introduces the library functions for various operations supported by SGL.
Figure 11-1 Trigonometric function image
Figure 11-2 “slAtan” image
┌─ ● Vector dot product return value ● ───────────────────────────┐ │ A (X1, Y1, Z1) * B (X2, Y2, Z2) = X1 * X2 + Y1 * Y2 + Z1 * Z2 │ │ = Return Value │ └─────────────────────────────────────────┘
| Decimal | BCD | Hexadecimal | |
|---|---|---|---|
| labels | 92 | 0x92 | 0x5CH |
Functional type | Seki several people | Parameter | function |
|---|---|---|---|
| FIXED | slDivFX | FIXED a, FIXED b | Division (a / b) |
| FIXED | slMulFX | FIXED a, FIXED b | Multiplication (a * b) |
| FIXED | slSquartFX | FIXED sqrtfx | Unsigned fixed-point square root |
| Uint32 | slSquart | Uint32 sqrt | Square root of unsigned integer |
| FIXED | slSin | ANGLE angs | Returns a sine value for the specified angle |
| FIXED | slCos | ANGLE angc | Returns the cosine value for the specified angle |
| FIXED | slTan | ANGLE angt | Returns the tangent value for the specified angle |
| ANGLE | slAtan | FIXED tx, FIXED ty | Returns the angle in the specified direction |
| FIXED | slCalcPoint | FIXED zx, cy, cz, FIXED * ret | Multiplies the current matrix by the specified point and returns |
| FIXED | slInnerProduct | VECTOR a, VECTOR b | Take the inner product of the vectors |
| Uint32 | slDec2Hex | Uint32 val | Conversion from BCD code to hexadecimal code |
| Uint32 | slHex2Dec | Uint32 val | Conversion from hexadecimal code to BCD code |
| Uint16 | slAng2Hex | ANGLE ang | Conversion from ANGLE code to hexadecimal code |
| Uint16 | slAng2Dec | ANGLE ang | Conversion from ANGLE code to BCD code |
| FIXED | slAng2FX | ANGLE ang | Conversion from ANGLE code to FIXED code |
★ SGL User's Manual ★ PROGRAMMER'S STRUCT