言語 環境比較
 
Index
 
  Processing 1.0 _ALPHAリファレンスは開発途中である。
もしエラーやコメントがあれば、reas at groupc.netへメールして下さい。
Name  

constrain()

   
Examples  
void loop() 
{ 
  float mx = constrain(mouseX, 30, 70); 
  rect(mx-10, 40, 20, 20); 
} 
Description  

値が最大と最小値を超えないように制約する

 

   
Syntax  
constrain(value, min, max)
   
Parameters  
value  

整数か浮動少数点数 : 制約する値

 

min   整数か浮動少数点数 : 最小のリミット

max   整数か浮動少数点数 : 最大のリミット

   
Returns   整数か浮動少数点数(インプットの値におうじて)
   
Usage   Web & Application
   
Related   max()
min()
   
© 2004- 2001 Massachusetts Institute of Technology and Interaction Design Institute Ivrea
Processing is an open project initiated by Ben Fry and Casey Reas