History

Spectacle vc2010

Spencer Salazar committed 12 years ago

Commit 5907a6a1 parent bc690b66 files · +38 −7Browse files

Showing the changes to Spectacle/SpectacleBase.cpp (1 of 6 files). Show all

Unified · Split

Spectacle/SpectacleBase.cpp+10−1
@@ -36,6 +36,15 @@ · 35 unmodified lines
3636 #define atan2f(y, x) atan2((y), (x))
3737 #endif
3838
39+#ifdef WIN32
40+#include <stdlib.h>
41+#define random() rand()
42+#endif
43+#ifndef M_PI
44+#define M_PI 3.14159265358979323846
45+#endif
46+
47+
3948 const int kMaxWindowLen = kMaxFFTLen * 8;
4049 const int kMinOverlap = 1;
4150 const int kMaxOverlap = 64;
@@ -522,7 +531,7 @@ void SpectacleBase::update_bin_groups( · 480 unmodified lines
522531 const int extrabins = (highshelfbin - lowshelfbin) - cntltablen;
523532 //if (extrabins <= 0)
524533 //error("%s: program error - contact johgibso@gmail.com", instname());
525− const int nsums = int(sqrt(2 * extrabins) + 2);
534+ const int nsums = int(sqrt(2.0 * extrabins) + 2.0);
526535
527536 // Compute the sum of integers for n in [nsums-2, nsums);
528537 // formula is the closed-form equation: x = n * (n + 1) / 2.

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t