mirror of
				https://github.com/Oxalide/vsphere-influxdb-go.git
				synced 2023-10-10 11:36:51 +00:00 
			
		
		
		
	Fix average returning 1
This commit is contained in:
		@@ -684,7 +684,7 @@ func average(n ...int64) int64 {
 | 
			
		||||
	for _, i := range n {
 | 
			
		||||
		if i >= 0 {
 | 
			
		||||
			count++
 | 
			
		||||
			total++
 | 
			
		||||
			total += i
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	favg := float64(total) / float64(count)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user