mirror of
https://github.com/HandmadeMath/HandmadeMath.git
synced 2026-01-06 19:37:40 +00:00
Allow HMM_PowerF to try and compute negative bases
This commit is contained in:
@@ -680,14 +680,7 @@ HMM_Power(float Base, int Exponent)
|
||||
HINLINE float
|
||||
HMM_PowerF(float Base, float Exponent)
|
||||
{
|
||||
if (Base > 0)
|
||||
{
|
||||
return expf(Exponent * logf(Base));
|
||||
}
|
||||
else
|
||||
{
|
||||
return -expf(Exponent * logf(-Base));
|
||||
}
|
||||
return expf(Exponent * logf(Base));
|
||||
}
|
||||
|
||||
HINLINE float
|
||||
|
||||
Reference in New Issue
Block a user