mirror of
				https://github.com/zenorogue/hyperrogue.git
				synced 2025-10-31 14:02:59 +00:00 
			
		
		
		
	more ddspin/nearcorner bugfixes
This commit is contained in:
		| @@ -529,7 +529,7 @@ hyperpoint nearcorner(cell *c, int i) { | |||||||
|     if(approx_nearcorner) |     if(approx_nearcorner) | ||||||
|       return kite::get_corner(c, i, 3) + kite::get_corner(c, i+1, 3) - C0; |       return kite::get_corner(c, i, 3) + kite::get_corner(c, i+1, 3) - C0; | ||||||
|     else |     else | ||||||
|       return calc_relative_matrix(c->move(i), c, C0) * C0; |       return calc_relative_matrix(c->cmove(i), c, C0) * C0; | ||||||
|     } |     } | ||||||
|   if(binarytiling) { |   if(binarytiling) { | ||||||
|     if(WDIM == 3) { |     if(WDIM == 3) { | ||||||
|   | |||||||
| @@ -365,13 +365,13 @@ double hexshiftat(cell *c) { | |||||||
|  |  | ||||||
| transmatrix ddspin(cell *c, int d, ld bonus) { | transmatrix ddspin(cell *c, int d, ld bonus) { | ||||||
|   if(WDIM == 3 && d < c->type) return rspintox(tC0(calc_relative_matrix(c->cmove(d), c, C0))) * cspin(2, 0, bonus); |   if(WDIM == 3 && d < c->type) return rspintox(tC0(calc_relative_matrix(c->cmove(d), c, C0))) * cspin(2, 0, bonus); | ||||||
|   if(WDIM == 2 && (binarytiling || penrose)) return spin(bonus) * rspintox(nearcorner(c, d)); |   if(WDIM == 2 && (binarytiling || penrose) && d < c->type) return spin(bonus) * rspintox(nearcorner(c, d)); | ||||||
|   return spin(displayspin(c, d) + bonus - hexshiftat(c)); |   return spin(displayspin(c, d) + bonus - hexshiftat(c)); | ||||||
|   } |   } | ||||||
|  |  | ||||||
| transmatrix iddspin(cell *c, int d, ld bonus) { | transmatrix iddspin(cell *c, int d, ld bonus) { | ||||||
|   if(WDIM == 3 && d < c->type) return cspin(0, 2, bonus) * spintox(tC0(calc_relative_matrix(c->cmove(d), c, C0))); |   if(WDIM == 3 && d < c->type) return cspin(0, 2, bonus) * spintox(tC0(calc_relative_matrix(c->cmove(d), c, C0))); | ||||||
|   if(WDIM == 2 && (binarytiling || penrose)) return spin(bonus) * spintox(nearcorner(c, d)); |   if(WDIM == 2 && (binarytiling || penrose) && d < c->type) return spin(bonus) * spintox(nearcorner(c, d)); | ||||||
|   return spin(hexshiftat(c) - displayspin(c, d) + bonus); |   return spin(hexshiftat(c) - displayspin(c, d) + bonus); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Zeno Rogue
					Zeno Rogue