Post your questions and help other users.
	Moderator: Martin
			
		
		
			- 
				
																			
								akapelis							 
									
		- Posts: 41
 		- Joined: 13 Jul 2016 20:51
 		
		
						
						
		
		
						
						
													
							
						
									
						Post
					
								by akapelis » 28 May 2019 20:31
			
			
			
			
			Why this simple script returns "2" Instead of "2.7777"?
I would like to obtain the rounded result of the operation (3) but I can't. Please help me.
							
					- 
						Attachments
					
 
											- 
			
		
				
			
 
						- Screenshot_20190528_222224_ch.gridvision.ppam.androidautomagic.jpg (264.45 KiB) Viewed 12933 times
 
		
		
		
		
			 
									
			
									
									
						 
		 
				
		
		 
	 
	
				
		
		
			- 
				
																			
								anuraag							 
									
		- Posts: 371
 		- Joined: 24 Jan 2015 02:06
 		
		
						
						
		
		
						
						
													
							
						
									
						Post
					
								by anuraag » 28 May 2019 23:54
			
			
			
			
			Desmanto wrote: ↑22 Jan 2019 18:01
Common division will always result in integer. You must have one of the number involved in division to have decimal. 
 
So add decimal in one of number
So 
 
			
									
									
						 
		 
				
		
		 
	 
	
				
	
				
		
		
			- 
				
																			
								Pepy							 
									
		- Posts: 76
 		- Joined: 31 Oct 2018 10:53
 		
		
											- Location: Canada
 
							
						
		
		
						
						
													
							
						
									
						Post
					
								by Pepy » 30 May 2019 09:41
			
			
			
			
			akapelis wrote: ↑28 May 2019 20:31
Why this simple script returns "2" Instead of "2.7777"?
I would like to obtain the rounded result of the operation (3) but I can't. Please help me.
 
One of the numbers in the expression has to be a decimal, otherwise the result will be an integer (and any decimals in the result will be cut off).
 
			
									
									Hope my post was helpful 
 
Device: OnePlus 5T running crDroid, rooted with Magisk 

 
						 
		 
				
		
		 
	 
	
				
		
		
			- 
				
																			
								akapelis							 
									
		- Posts: 41
 		- Joined: 13 Jul 2016 20:51
 		
		
						
						
		
		
						
						
													
							
						
									
						Post
					
								by akapelis » 31 May 2019 18:30
			
			
			
			
			Pepy wrote: ↑30 May 2019 09:41
akapelis wrote: ↑28 May 2019 20:31
Why this simple script returns "2" Instead of "2.7777"?
I would like to obtain the rounded result of the operation (3) but I can't. Please help me.
 
One of the numbers in the expression has to be a decimal, otherwise the result will be an integer (and any decimals in the result will be cut off).
 
Thank you very much.