Explorar o código

i.vi: fix PVI formula (#1985)

* Fix wrong mathematical formula in the PVI index computation in i.vi

* fix #1984
Ondrej Pesek %!s(int64=3) %!d(string=hai) anos
pai
achega
951d8a873c
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      imagery/i.vi/pvi.c

+ 1 - 1
imagery/i.vi/pvi.c

@@ -17,7 +17,7 @@ double p_vi(double redchan, double nirchan)
 	result = -1.0;
 	result = -1.0;
     }
     }
     else {
     else {
-	result = (sin(1) * nirchan) / (cos(1) * redchan);
+	result = (sin(1) * nirchan) - (cos(1) * redchan);
     }
     }
     return result;
     return result;
 }
 }