mirror of
				https://github.com/zenorogue/hyperrogue.git
				synced 2025-10-30 21:42:59 +00:00 
			
		
		
		
	parser:: ifz function
This commit is contained in:
		
							
								
								
									
										8
									
								
								util.cpp
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								util.cpp
									
									
									
									
									
								
							| @@ -323,6 +323,14 @@ cld exp_parser::parse(int prio) { | ||||
|     cld no = parsepar(); | ||||
|     res = real(cond) > 0 ? yes : no; | ||||
|     }   | ||||
|   else if(eat("ifz(")) { | ||||
|     cld cond = parse(0); | ||||
|     force_eat(","); | ||||
|     cld yes = parse(0); | ||||
|     force_eat(","); | ||||
|     cld no = parsepar(); | ||||
|     res = abs(cond) < 1e-8 ? yes : no; | ||||
|     } | ||||
|   else if(eat("wallif(")) { | ||||
|     cld val0 = parse(0); | ||||
|     force_eat(","); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Zeno Rogue
					Zeno Rogue