블로그 이미지
Leeway is... the freedom that someone has to take the action they want to or to change their plans.
maetel

Notice

Recent Post

Recent Comment

Recent Trackback

Archive

calendar

1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
  • total
  • today
  • yesterday

Category

2007. 4. 19. 00:17 Code/Java
constrain

ref. http://dev.processing.org/reference/everything/

View of /trunk/processing/core/src/processing/core/PApplet.java

constrain(float, float, float) - Static method in class processing.core.

public static final float constrain(float amt, float low, float high)

static public final float constrain(float amt, float low, float high) {
   return (amt < low) ? low : ((amt > high) ? high : amt);
 }



constrain(int, int, int) - Static method in class processing.core.

public static final int constrain(int amt, int low, int high)

  static public final int constrain(int amt, int low, int high) {
   return (amt < low) ? low : ((amt > high) ? high : amt);
 }


'Code > Java' 카테고리의 다른 글

noise()  (0) 2007.04.20
posted by maetel