mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-12-12 13:12:14 +00:00
Use new degree FLOPs for DECORATE expressions.
- Now that the VM supports degrees, use those instructions when emitting code for cos and sin DECORATE expressions. (This looks like it also fixed a bug where sqrt also did the degree to radian conversion.)
This commit is contained in:
parent
ff7b1f6e5e
commit
c810b4d724
1 changed files with 2 additions and 3 deletions
|
@ -3458,11 +3458,10 @@ ExpEmit FxGlobalFunctionCall::Emit(VMFunctionBuilder *build)
|
|||
ExpEmit v = (*ArgList)[0]->Emit(build);
|
||||
assert(!v.Konst && v.RegType == REGT_FLOAT);
|
||||
|
||||
build->Emit(OP_MULF_RK, v.RegNum, v.RegNum, build->GetConstantFloat(M_PI / 180.0));
|
||||
build->Emit(OP_FLOP, v.RegNum, v.RegNum,
|
||||
(Name == NAME_Sqrt) ? FLOP_SQRT :
|
||||
(Name == NAME_Sin) ? FLOP_SIN :
|
||||
FLOP_COS);
|
||||
(Name == NAME_Sin) ? FLOP_SIN_DEG :
|
||||
FLOP_COS_DEG);
|
||||
return v;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue