mirror of
				https://github.com/zenorogue/hyperrogue.git
				synced 2025-10-31 05:52:59 +00:00 
			
		
		
		
	moved hyperpoint inlines to hyperpoint.cpp
This commit is contained in:
		
							
								
								
									
										26
									
								
								hyper.h
									
									
									
									
									
								
							
							
						
						
									
										26
									
								
								hyper.h
									
									
									
									
									
								
							| @@ -2824,30 +2824,4 @@ static const color_t NOCOLOR = 0; | ||||
|  | ||||
| namespace hr { | ||||
|   inline bool movepcto(const movedir& md) { return movepcto(md.d, md.subdir); } | ||||
|  | ||||
|   inline hyperpoint cpush0(int c, ld x) {  | ||||
|     hyperpoint h = Hypc; | ||||
|     h[GDIM] = cos_auto(x); | ||||
|     h[c] = sin_auto(x); | ||||
|     return h; | ||||
|     } | ||||
|    | ||||
|   inline hyperpoint xspinpush0(ld alpha, ld x) {  | ||||
|     hyperpoint h = Hypc; | ||||
|     h[GDIM] = cos_auto(x); | ||||
|     h[0] = sin_auto(x) * cos(alpha); | ||||
|     h[1] = sin_auto(x) * -sin(alpha); | ||||
|     return h; | ||||
|     } | ||||
|  | ||||
|   inline hyperpoint xpush0(ld x) { return cpush0(0, x); } | ||||
|   inline hyperpoint ypush0(ld x) { return cpush0(1, x); } | ||||
|   inline void reset_projection() { new_projection_needed = true; } | ||||
|  | ||||
|   // T * C0, optimized | ||||
|   inline hyperpoint tC0(const transmatrix &T) { | ||||
|     hyperpoint z; | ||||
|     for(int i=0; i<MDIM; i++) z[i] = T[i][DIM]; | ||||
|     return z; | ||||
|     } | ||||
|   } | ||||
|   | ||||
| @@ -791,4 +791,32 @@ EX ld ortho_error(transmatrix T) { | ||||
|   return err;       | ||||
|   } | ||||
|  | ||||
| #if HDR | ||||
| inline hyperpoint cpush0(int c, ld x) {  | ||||
|   hyperpoint h = Hypc; | ||||
|   h[GDIM] = cos_auto(x); | ||||
|   h[c] = sin_auto(x); | ||||
|   return h; | ||||
|   } | ||||
|  | ||||
| inline hyperpoint xspinpush0(ld alpha, ld x) {  | ||||
|   hyperpoint h = Hypc; | ||||
|   h[GDIM] = cos_auto(x); | ||||
|   h[0] = sin_auto(x) * cos(alpha); | ||||
|   h[1] = sin_auto(x) * -sin(alpha); | ||||
|   return h; | ||||
|   } | ||||
|  | ||||
| inline hyperpoint xpush0(ld x) { return cpush0(0, x); } | ||||
| inline hyperpoint ypush0(ld x) { return cpush0(1, x); } | ||||
| inline void reset_projection() { new_projection_needed = true; } | ||||
|  | ||||
| // T * C0, optimized | ||||
| inline hyperpoint tC0(const transmatrix &T) { | ||||
|   hyperpoint z; | ||||
|   for(int i=0; i<MDIM; i++) z[i] = T[i][DIM]; | ||||
|   return z; | ||||
|   } | ||||
| #endif | ||||
|  | ||||
| } | ||||
|   | ||||
| @@ -47,13 +47,13 @@ int eupattern4(cell *c) { | ||||
|   return (x&1) + ((y&1)) * 2; | ||||
|   } | ||||
|  | ||||
| bool ishept(cell *c) { | ||||
| EX bool ishept(cell *c) { | ||||
|   // EUCLIDEAN | ||||
|   if(euclid) return eupattern(c) == 0; | ||||
|   else return c->type == S7; | ||||
|   } | ||||
|  | ||||
| bool ishex1(cell *c) { | ||||
| EX bool ishex1(cell *c) { | ||||
|   // EUCLIDEAN | ||||
|   if(euclid) return eupattern(c) == 1; | ||||
|   #if CAP_GP | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Zeno Rogue
					Zeno Rogue