Java Array Max Value max(float[] position, int x)

Here you can find the source of max(float[] position, int x)

Description

max

License

Open Source License

Declaration

public static float[] max(float[] position, int x) 

Method Source Code

//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;
    }
}

Related

  1. max(float... fs)
  2. max(float... fs)
  3. max(float... values)
  4. max(float[] floats)
  5. max(float[] in, int[] idx)
  6. max(float[] t)
  7. max(float[] v1, float[] v2)
  8. max(int array[])
  9. max(int value1, int value2, int... values)