Add float f suffix

This commit is contained in:
CovenEsme
2025-03-14 13:11:59 +00:00
parent 6c1ca01667
commit d3d336f7a3
9 changed files with 31 additions and 30 deletions
@@ -46,7 +46,8 @@
#ifdef __STDC__
double sin(double x)
#else
double sin(x) double x;
double sin(x)
double x;
#endif
{
double y[2], z = 0.0;
@@ -57,25 +58,23 @@ double sin(x) double x;
/* |x| ~< pi/4 */
ix &= 0x7fffffff;
if (ix <= 0x3fe921fb)
if (ix <= 0x3fe921fb) {
return __kernel_sin(x, z, 0);
}
/* sin(Inf or NaN) is NaN */
else if (ix >= 0x7ff00000)
else if (ix >= 0x7ff00000) {
return x - x;
}
/* argument reduction needed */
else {
n = __ieee754_rem_pio2(x, y);
switch (n & 3) {
case 0:
return __kernel_sin(y[0], y[1], 1);
case 1:
return __kernel_cos(y[0], y[1]);
case 2:
return -__kernel_sin(y[0], y[1], 1);
default:
return -__kernel_cos(y[0], y[1]);
case 0: return __kernel_sin(y[0], y[1], 1);
case 1: return __kernel_cos(y[0], y[1]);
case 2: return -__kernel_sin(y[0], y[1], 1);
default: return -__kernel_cos(y[0], y[1]);
}
}
}
}
@@ -45,7 +45,8 @@
#ifdef __STDC__
double tan(double x)
#else
double tan(x) double x;
double tan(x)
double x;
#endif
{
double y[2], z = 0.0;
@@ -56,12 +57,14 @@ double tan(x) double x;
/* |x| ~< pi/4 */
ix &= 0x7fffffff;
if (ix <= 0x3fe921fb)
if (ix <= 0x3fe921fb) {
return __kernel_tan(x, z, 1);
}
/* tan(Inf or NaN) is NaN */
else if (ix >= 0x7ff00000)
else if (ix >= 0x7ff00000) {
return x - x; /* NaN */
}
/* argument reduction needed */
else {
@@ -69,4 +72,4 @@ double tan(x) double x;
return __kernel_tan(y[0], y[1], 1 - ((n & 1) << 1)); /* 1 -- n even
-1 -- n odd */
}
}
}
+1 -1
View File
@@ -27,7 +27,7 @@ int dAcOfenceBoko_c::create() {
roomid = mCollision.mRoomId;
mModel.setPriorityDraw(0x1C, 0x9);
boundingBox.Set(mVec3_c(-210.0f, -10.0f, -20.0f), mVec3_c(210.0f, 340.0f, 20.0f));
mCullingDistance = 50000.0;
mCullingDistance = 50000.0f;
return SUCCEEDED;
}
+1 -1
View File
@@ -23,7 +23,7 @@ int dAcOfenceBoko2_c::create() {
dBgS::GetInstance()->RegistBg(&mCollision, this);
mModel.setPriorityDraw(0x1C, 0x9);
boundingBox.Set(mVec3_c(-160.0f, -40.0f, -70.0f), mVec3_c(180.0f, 300.0f, 60.0f));
mCullingDistance = 50000.0;
mCullingDistance = 50000.0f;
return SUCCEEDED;
}
+1 -1
View File
@@ -23,7 +23,7 @@ int dAcOironStage_c::create() {
dBgS::GetInstance()->Regist(&mCollision, this);
mModel.setPriorityDraw(0x1C, 0x9);
boundingBox.Set(mVec3_c(-460.0f, -210.0f, -260.0f), mVec3_c(460.0f, 210.0f, 260.0f));
mCullingDistance = 15000.0;
mCullingDistance = 15000.0f;
return SUCCEEDED;
}
+2 -2
View File
@@ -44,9 +44,9 @@ int dAcOpumpkinBar_c::create() {
// 100000.0 is in the rodata and the instructions need it.
// This also works if a separate variable is used but I
// think it's more likely that mCullingDistance got set twice.
mCullingDistance = 100000.0;
mCullingDistance = 100000.0f;
boundingBox.Set(mVec3_c(-2790.0f, -1450.0f, -8270.0f), mVec3_c(2880.0f, 2120.0f, 1370.0f));
mCullingDistance = 500000.0;
mCullingDistance = 500000.0f;
mBarCollision.SetRideCallback(barCollisionRideCallback);
return SUCCEEDED;
}
+1 -1
View File
@@ -15,7 +15,7 @@ int dAcOshrineAfter_c::create() {
mModel.setLocalMtx(mWorldMtx);
mModel.setPriorityDraw(0x1C, 0x9);
boundingBox.Set(mVec3_c(-4000.0f, 7000.0f, 5000.0f), mVec3_c(5000.0f, 15000.0f, 14000.0f));
mCullingDistance = 50000.0;
mCullingDistance = 50000.0f;
return SUCCEEDED;
}
+1 -1
View File
@@ -15,7 +15,7 @@ int dAcOshrineBefore_c::create() {
mModel.setLocalMtx(mWorldMtx);
mModel.setPriorityDraw(0x1C, 0x9);
boundingBox.Set(mVec3_c(-4000.0f, 7000.0f, 5000.0f), mVec3_c(4000.0f, 13000.0f, 14000.0f));
mCullingDistance = 50000.0;
mCullingDistance = 50000.0f;
return SUCCEEDED;
}
+6 -7
View File
@@ -8,7 +8,6 @@
#include "rvl/VI.h" // IWYU pragma: export
#include "string.h"
EGG::NullController null_controller;
namespace EGG {
@@ -63,8 +62,8 @@ CoreController::CoreController() : mDpdPos(), mAccel(), mAccelFlags(), mFlag(0)
void CoreController::sceneReset() {
mAccel.set(0.0, 0.0, 0.0);
mDpdPos.x = 0.0;
mDpdPos.y = 0.0;
mDpdPos.x = 0.0f;
mDpdPos.y = 0.0f;
mIdleTime = 0;
mPostureMatrixPrev.makeIdentity();
mPostureMatrix.makeIdentity();
@@ -286,7 +285,7 @@ void CoreController::endFrame() {
/* 0x80499AC0 */
f32 CoreController::getFreeStickX() const {
if (mCoreStatus->getDevType() == WPAD_DEV_CORE) {
return 0.0;
return 0.0f;
}
return mCoreStatus[0].getFSStickX();
}
@@ -294,7 +293,7 @@ f32 CoreController::getFreeStickX() const {
/* 0x80499AE0 */
f32 CoreController::getFreeStickY() const {
if (mCoreStatus->getDevType() == WPAD_DEV_CORE) {
return 0.0;
return 0.0f;
}
return mCoreStatus[0].getFSStickY();
}
@@ -429,8 +428,8 @@ void ControllerRumbleUnit::init() {
mPattern = nullptr;
mPatternPos = nullptr;
mTimer = 0;
mIntensity = 0.0;
mRampUp = 0.0;
mIntensity = 0.0f;
mRampUp = 0.0f;
mFlag.makeAllZero();
}