1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-09-06 12:27:57 +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:
Zeno Rogue
2022-11-12 22:38:45 +01:00
parent 563b9c1f74
commit 06523e063e
100 changed files with 750 additions and 757 deletions

View File

@@ -176,7 +176,7 @@ EX namespace models {
euclidean_spin = pispin * iso_inverse(cview().T * currentmap->master_relative(centerover, true));
euclidean_spin = gpushxto0(euclidean_spin * C0) * euclidean_spin;
hyperpoint h = inverse(euclidean_spin) * (C0 + (euc::eumove(gp::loc{1,0})*C0 - C0) * vpconf.spiral_x + (euc::eumove(gp::loc{0,1})*C0 - C0) * vpconf.spiral_y);
spiral_multiplier = cld(0, 2 * M_PI) / cld(h[0], h[1]);
spiral_multiplier = cld(0, TAU) / cld(h[0], h[1]);
}
if(centerover && !history::on)
@@ -323,11 +323,11 @@ EX namespace models {
initquickqueue();
queuereset(mdPixel, PPR::LINE);
for(int a=-1; a<=1; a++) {
curvepoint(point2(-M_PI/2 * current_display->radius, a*current_display->radius));
curvepoint(point2(+M_PI/2 * current_display->radius, a*current_display->radius));
curvepoint(point2(-90._deg * current_display->radius, a*current_display->radius));
curvepoint(point2(+90._deg * current_display->radius, a*current_display->radius));
queuecurve(shiftless(Id), forecolor, 0, PPR::LINE);
curvepoint(point2(a*current_display->radius, -M_PI/2*current_display->radius));
curvepoint(point2(a*current_display->radius, +M_PI/2*current_display->radius));
curvepoint(point2(a*current_display->radius, -90._deg * current_display->radius));
curvepoint(point2(a*current_display->radius, +90._deg * current_display->radius));
queuecurve(shiftless(Id), forecolor, 0, PPR::LINE);
}
queuereset(vpconf.model, PPR::LINE);
@@ -1035,7 +1035,7 @@ EX namespace models {
"Here you can change this parameter.", 'b');
param_f(p.miller_parameter, sp+"miller");
param_f(p.loximuthal_parameter, sp+"loximuthal")
-> editable(-M_PI/2, M_PI/2, .1, "loximuthal parameter",
-> editable(-90._deg, 90._deg, .1, "loximuthal parameter",
"Loximuthal is similar to azimuthal equidistant, but based on loxodromes (lines of constant geographic direction) rather than geodesics. "
"The loximuthal projection maps (the shortest) loxodromes to straight lines of the same length, going through the starting point. "
"This setting changes the latitude of the starting point.\n\n"