We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6ae3581 commit 2a91238Copy full SHA for 2a91238
image/PNG/src/prime-art.cxx
@@ -82,8 +82,8 @@ int main(int argc, const char* argv[]) {
82
*
83
* ketika i = s * s gw mau r = halfdiagonal = sqrt(2)/2 * s
84
* sehingga r = dR * s * s = sqrt(2)/2 * s
85
- * dR * s = sqrt(2)/2 * s
86
- * dR = sqrt(2)/2
+ * dR * s = sqrt(2)/2
+ * dR = sqrt(2)/2/s
87
*/
88
89
/* Solve dTheta
@@ -95,7 +95,7 @@ int main(int argc, const char* argv[]) {
95
* dTheta = 2/sqrt(2) * sqrt(i)
96
97
98
- float dR = 0.5 * std::sqrt(2.0f);
+ float dR = 0.5f * 1/(float)(WIDTH > HEIGHT? WIDTH :HEIGHT) * std::sqrt(2.0f);
99
const uint64_t cx = WIDTH / 2;
100
const uint64_t cy = HEIGHT / 2;
101
0 commit comments