mirror of
				https://github.com/zenorogue/hyperrogue.git
				synced 2025-10-31 05:52:59 +00:00 
			
		
		
		
	lie_exp approximation for other geometries
This commit is contained in:
		
							
								
								
									
										11
									
								
								hypgraph.cpp
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								hypgraph.cpp
									
									
									
									
									
								
							| @@ -2976,8 +2976,15 @@ EX hyperpoint lie_exp(hyperpoint h) { | |||||||
|     z = h[2] * log(3); |     z = h[2] * log(3); | ||||||
|     h[1] *= (exp(+z) - 1) / z; |     h[1] *= (exp(+z) - 1) / z; | ||||||
|     } |     } | ||||||
|   else if(sl2) { |   else { | ||||||
|     /* not implemented */ |     /* not implemented -- approximate for now */ | ||||||
|  |     const int steps = 16; | ||||||
|  |     h /= (1<<steps); | ||||||
|  |     h[3] = 1; | ||||||
|  |     normalize(h); | ||||||
|  |     transmatrix T = eupush(h); | ||||||
|  |     for(int i=0; i<16; i++) T = T * T; | ||||||
|  |     h = tC0(T); | ||||||
|     } |     } | ||||||
|   return h; |   return h; | ||||||
|   } |   } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Zeno Rogue
					Zeno Rogue