mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-09-08 05:16:00 +00:00
used cyclefix and raddif in more places; (c)spin90, (c)spin180 and spin180 functions; rephrased M_PI in terms of TAU and x._deg when applicable
This commit is contained in:
@@ -35,11 +35,8 @@ void do_analyze_grid(int maxv) {
|
||||
alpha[qalpha++] = atan2(h1[0], h1[1]);
|
||||
}
|
||||
if(qalpha != 2) printf("Error: qalpha = %d\n", qalpha);
|
||||
ld df = alpha[0] - alpha[1];
|
||||
if(df<0) df = -df;
|
||||
while(df > 2*M_PI) df -= 2*M_PI;
|
||||
while(df > M_PI) df = 2*M_PI - df;
|
||||
df /= 4*M_PI;
|
||||
ld df = raddif(alpha[0], alpha[1]);
|
||||
df /= 720._deg;
|
||||
wstats[d][0] += df;
|
||||
if(d==2) printf("df == %" PLDF " dd = %" PLDF "\n", df, dd);
|
||||
wstats[d][1] += df*dd;
|
||||
|
@@ -114,7 +114,7 @@ void origcoords() {
|
||||
using namespace rogueviz;
|
||||
vertexcoords.resize(N);
|
||||
for(int i=0; i<N; i++)
|
||||
vertexcoords[i] = spin(coords[i].second * 2 * M_PI / 360) * xpush(coords[i].first) * C0;
|
||||
vertexcoords[i] = spin(coords[i].second * degree) * xpush(coords[i].first) * C0;
|
||||
}
|
||||
|
||||
// compute vertexcoords from the RogueViz representation
|
||||
|
Reference in New Issue
Block a user