Here you can find the source of powerType(float power)
protected static int powerType(float power)
//package com.java2s; public class Main { protected static int powerType(float power) { if (power < 400) { return 0; }/*from w w w . j av a 2 s .c om*/ int type = 1; return (type += Float.valueOf((power - 400) / 400).intValue()) > 3 ? 3 : type; } }