GLfloat a[4], result[4];
fetch_vector1(&inst->SrcReg[0], machine, a);
result[0] = result[1] = result[2] = result[3]
- = (GLfloat) cos(a[0]);
+ = cosf(a[0]);
store_vector4(inst, machine, result);
}
break;
if (inst->SrcReg[0].File != PROGRAM_UNDEFINED) {
GLfloat a[4];
fetch_vector1(&inst->SrcReg[0], machine, a);
- cond = (a[0] != 0.0);
+ cond = (a[0] != 0.0F);
}
else {
cond = eval_condition(machine, inst);
val = -FLT_MAX;
}
else {
- val = (float)(log(a[0]) * 1.442695F);
+ val = logf(a[0]) * 1.442695F;
}
result[0] = result[1] = result[2] = result[3] = val;
store_vector4(inst, machine, result);
result[1] = a[0];
/* XXX we could probably just use pow() here */
if (a[0] > 0.0F) {
- if (a[1] == 0.0 && a[3] == 0.0)
+ if (a[1] == 0.0F && a[3] == 0.0F)
result[2] = 1.0F;
else
- result[2] = (GLfloat) pow(a[1], a[3]);
+ result[2] = powf(a[1], a[3]);
}
else {
result[2] = 0.0F;
int exponent;
GLfloat mantissa = frexpf(t[0], &exponent);
q[0] = (GLfloat) (exponent - 1);
- q[1] = (GLfloat) (2.0 * mantissa); /* map [.5, 1) -> [1, 2) */
+ q[1] = 2.0F * mantissa; /* map [.5, 1) -> [1, 2) */
/* The fast LOG2 macro doesn't meet the precision
* requirements.
*/
- q[2] = (float)(log(t[0]) * 1.442695F);
+ q[2] = logf(t[0]) * 1.442695F;
}
}
else {
fetch_vector1(&inst->SrcReg[0], machine, a);
fetch_vector1(&inst->SrcReg[1], machine, b);
result[0] = result[1] = result[2] = result[3]
- = (GLfloat) pow(a[0], b[0]);
+ = powf(a[0], b[0]);
store_vector4(inst, machine, result);
}
break;
{
GLfloat a[4], result[4];
fetch_vector1(&inst->SrcReg[0], machine, a);
- result[0] = (GLfloat) cos(a[0]);
- result[1] = (GLfloat) sin(a[0]);
- result[2] = 0.0; /* undefined! */
- result[3] = 0.0; /* undefined! */
+ result[0] = cosf(a[0]);
+ result[1] = sinf(a[0]);
+ result[2] = 0.0F; /* undefined! */
+ result[3] = 0.0F; /* undefined! */
store_vector4(inst, machine, result);
}
break;
GLfloat a[4], result[4];
fetch_vector1(&inst->SrcReg[0], machine, a);
result[0] = result[1] = result[2] = result[3]
- = (GLfloat) sin(a[0]);
+ = sinf(a[0]);
store_vector4(inst, machine, result);
}
break;
* zero, we'd probably be fine except for an assert in
* IROUND_POS() which gets triggered by the inf values created.
*/
- if (texcoord[3] != 0.0) {
+ if (texcoord[3] != 0.0F) {
texcoord[0] /= texcoord[3];
texcoord[1] /= texcoord[3];
texcoord[2] /= texcoord[3];
fetch_vector4(&inst->SrcReg[0], machine, texcoord);
if (inst->TexSrcTarget != TEXTURE_CUBE_INDEX &&
- texcoord[3] != 0.0) {
+ texcoord[3] != 0.0F) {
texcoord[0] /= texcoord[3];
texcoord[1] /= texcoord[3];
texcoord[2] /= texcoord[3];