Bayley Wang
/
priustroller_3
temp repo
Fork of priustroller_2 by
Embed:
(wiki syntax)
Show/hide line numbers
fastmath.cpp
00001 #include "includes.h" 00002 #include "fastmath.h" 00003 #include "lut.h" 00004 00005 float FastMath::FastSin(float theta) { 00006 if (theta < 0.0f) theta += 360.0f; 00007 if (theta >= 360.0f) theta -= 360.0f; 00008 return 2.0f * sinetab[(int) theta] - 1.0f; 00009 } 00010 00011 float FastMath::FastCos(float theta) { 00012 return FastSin(90.0f - theta); 00013 } 00014 00015 float FastMath::FastSin01(float theta) { 00016 return FastSin(theta) * 0.5f + 0.5f; 00017 } 00018 00019 float FastMath::FastCos01(float theta) { 00020 return FastCos(theta) * 0.5f + 0.5f; 00021 }
Generated on Tue Jul 12 2022 20:58:06 by 1.7.2