mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-11-25 01:44:48 +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:
@@ -74,8 +74,8 @@ bool sunflower_cell(cell *c, shiftmatrix V) {
|
||||
|
||||
if(sphere) {
|
||||
if(infer == 'r')
|
||||
range = qty * density * M_PI/2;
|
||||
else qd = range * 2/M_PI;
|
||||
range = qty * density * 90._deg;
|
||||
else qd = range / 90._deg;
|
||||
}
|
||||
else if(euclid) {
|
||||
if(infer == 'r')
|
||||
@@ -108,7 +108,7 @@ bool sunflower_cell(cell *c, shiftmatrix V) {
|
||||
ld best_error = 1;
|
||||
vector<int> sgns;
|
||||
for(int i=1; i<iqty; i++) {
|
||||
ld v = i * step_angle / (2*M_PI);
|
||||
ld v = i * step_angle / TAU;
|
||||
v = frac(v);
|
||||
auto sgn = v > .5;
|
||||
if(sgn) v = 1-v;
|
||||
@@ -263,7 +263,7 @@ void show() {
|
||||
dialog::addSelItem("radius", fts(range), 'q');
|
||||
dialog::add_action([] {
|
||||
if(infer == 'r') infer = 'd';
|
||||
dialog::editNumber(range, 0, 10, .1, 2*M_PI, "range", "range");
|
||||
dialog::editNumber(range, 0, 10, .1, TAU, "range", "range");
|
||||
dialog::scaleLog();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user