We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ccf1f7f commit 82cd09fCopy full SHA for 82cd09f
src/main/java/com/pokegoapi/api/pokemon/Pokemon.java
@@ -267,6 +267,14 @@ public int getIndividualDefense() {
267
public int getIndividualStamina() {
268
return proto.getIndividualStamina();
269
}
270
+
271
+ /**
272
+ * Calculates the pokemons IV ratio.
273
+ * @return the pokemons IV ratio as a double between 0 and 1.0, 1.0 being perfect IVs
274
+ */
275
+ public double getIVRatio() {
276
+ return (this.getIndividualAttack() + this.getIndividualDefense() + this.getIndividualStamina()) / 45.0;
277
+ }
278
279
public float getCpMultiplier() {
280
return proto.getCpMultiplier();
0 commit comments