Here you can find the source of max(float dirOffset, float min, float max)
Parameter | Description |
---|---|
dirOffset | the offset of the direction |
min | the minimum |
max | the maximum |
public static float max(float dirOffset, float min, float max)
//package com.java2s; //License from project: LGPL public class Main { /**// w ww. jav a 2 s .c om * Gets the maximum of two values based on direction * @param dirOffset the offset of the direction * @param min the minimum * @param max the maximum * @return the maximum of two values based on direction */ public static float max(float dirOffset, float min, float max) { return dirOffset == 1 ? 1 : dirOffset == -1 ? min : max; } }