Следуйте инструкциям в видео ниже, чтобы узнать, как установить наш сайт как веб-приложение на главный экран вашего устройства.
Примечание: Эта функция может быть недоступна в некоторых браузерах.
public class AreaCoords implements ConfigurationSerializable {
public Location getBegin() {
return begin;
}
public Location getEnd() {
return end;
}
public void setBegin(Location begin) {
this.begin = begin;
}
public void setEnd(Location end) {
this.end = end;
}
Location begin;
Location end;
public AreaCoords(Location begin, Location end) {
this.begin = begin;
this.end = end;
}
public AreaCoords(Location point, boolean fromEnd) {
if(!fromEnd) {
this.begin = point;
} else {
this.end = point;
}
}
public AreaCoords clone() {
return new AreaCoords(begin, end);
}
public boolean isFull() {
return (begin != null && end !=null);
}
public int calculateVolume() {
int Ydist = (int) Math.abs(begin.getX() - end.getX()) + 1;
int Xdist = (int) Math.abs(begin.getY() - end.getY()) + 1;
int Zdist = (int) Math.abs(begin.getZ() - end.getZ()) + 1;
return Ydist*Xdist*Zdist;
}
public Map<String, Object> serialize() {
Map<String, Object> data = new HashMap<String, Object>();
data.put("begin", begin);
data.put("end", end);
return data;
}
public static AreaCoords deserialize(Map<String, Object> args) {
Location begin = (Location) args.get("begin");
Location end = (Location) args.get("end");
return new AreaCoords(begin, end);
}
}
Я делал независимый от ведроапи скрипт. Потому нет локаций. И у тебя еще нет нормализации мин макс.