asm { _F64_TO_F32:: PUSH RBP MOV RBP, RSP CVTSD2SS XMM0, SF_ARG1[RBP] MOVQ RAX, XMM0 POP RBP RET1 8 } /** @ingroup Math @brief Convert double-precision scalar to single-precision. @param[in] d Double-precision scalar. @return Single-precision scalar. */ _extern _F64_TO_F32 U32 F64ToF32(F64 d); asm { _F32_TO_F64:: PUSH RBP MOV RBP, RSP CVTSS2SD XMM0, SF_ARG1[RBP] MOVQ RAX, XMM0 POP RBP RET1 8 } /** @ingroup Math @brief Convert single-precision scalar to double-precision. @param[in] f Single-precision scalar. @return Double-precision scalar. */ _extern _F32_TO_F64 F64 F32ToF64(U32 f); asm { _F32_RAD_TO_DEG:: PUSH RBP MOV RBP, RSP MOVSS XMM0, SF_ARG1[RBP] MOV RAX, F32_PI_OVER_180 MOVQ XMM1, RAX MULSS XMM0, XMM1 MOVQ RAX, XMM0 POP RBP RET1 8 } /** @ingroup Math @brief Convert single-precision radians to single-precision degrees. @param[in] rad Single-precision angle in radians. @return Single-precision angle in degrees. */ _extern _F32_RAD_TO_DEG F32 F32RadToDeg(F32 rad); asm { _F32_DEG_TO_RAD:: PUSH RBP MOV RBP, RSP MOVSS XMM0, SF_ARG1[RBP] MOV RAX, F32_180_OVER_PI MOVQ XMM1, RAX MULSS XMM0, XMM1 MOVQ RAX, XMM0 POP RBP RET1 8 } /** @ingroup Math @brief Convert single-precision degrees to single-precision radians. @param[in] deg Single-precision angle in degrees. @return Single-precision angle in radians. */ _extern _F32_DEG_TO_RAD F32 F32DegToRad(F32 deg);