Here you can find the source of min(float dirOffset, float min, float max)
Parameter | Description |
---|---|
dirOffset | the offset of the direction |
min | the minimum |
max | the maximum |
public static float min(float dirOffset, float min, float max)
//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; } }