Here you can find the source of max(float[] position, int x)
public static float[] max(float[] position, int x)
//package com.java2s; //License from project: Open Source License public class Main { public static float[] max(float[] position, int x) { int l = position.length; float[] res = new float[l]; for (int i = 0; i < l; i++) { if (position[i] < x) res[i] = x;// w ww.j a v a 2 s . c o m else res[i] = position[i]; } return res; } }