AOT計算で呼び出し自体を早くする三角関数

Dependents:   NuMidi401 NuFM401

Files at this revision

API Documentation at this revision

Comitter:
kb10uy
Date:
Fri Dec 26 03:12:20 2014 +0000
Parent:
5:2a67061cea78
Child:
7:eed80268ab34
Commit message:
wey

Changed in this revision

AOTTrigon.cpp Show annotated file Show diff for this revision Revisions of this file
AOTTrigon.h Show annotated file Show diff for this revision Revisions of this file
--- a/AOTTrigon.cpp	Fri Dec 26 03:07:12 2014 +0000
+++ b/AOTTrigon.cpp	Fri Dec 26 03:12:20 2014 +0000
@@ -2,7 +2,7 @@
 
 AOTTrigon::AOTTrigon(): pi(3.14159265358979323846264)
 {
-    rate = division / (pi * 2.0);
+    rate = 256 / (pi * 2.0);
     t_sin = new double[256];
     for(int i = 0; i < 256; i++)
         t_sin[i] = sin((double)i / 256.0 * (pi * 2.0));
--- a/AOTTrigon.h	Fri Dec 26 03:07:12 2014 +0000
+++ b/AOTTrigon.h	Fri Dec 26 03:12:20 2014 +0000
@@ -15,7 +15,6 @@
 
 private:
     double *t_sin;
-    const int division;
     double rate;
     const double pi;
 };