Java Number Min Value min(float dirOffset, float min, float max)

Here you can find the source of min(float dirOffset, float min, float max)

Description

Gets the minimum of two values based on direction

License

LGPL

Parameter

Parameter Description
dirOffset the offset of the direction
min the minimum
max the maximum

Return

the minimum of two values based on direction

Declaration

public static float min(float dirOffset, float min, float max) 

Method Source Code

//package com.java2s;
//License from project: LGPL 

public class Main {
    /**//from www  . j  av  a  2 s  .  c o  m
     * Gets the minimum of two values based on direction
     * @param dirOffset the offset of the direction
     * @param min the minimum
     * @param max the maximum
     * @return the minimum of two values based on direction
     */
    public static float min(float dirOffset, float min, float max) {
        return dirOffset == 1 ? max : dirOffset == -1 ? 0 : min;
    }
}

Related

  1. min(final NUMBER_TYPE number1, final NUMBER_TYPE number2)
  2. min(final String string1, final String string2)
  3. min(float a, float b)
  4. min(float a, float b)
  5. min(float a, float b, float c, float d, float e)
  6. min(float value1, float value2)
  7. min(float value1, float value2)
  8. min(float x0, float x1)
  9. min(int a, int b)