공지사항: 
2025년 4월 15일 전에 Earth Engine 사용을 위해 등록된 모든 비상업용 프로젝트는 액세스 권한을 유지하기 위해 
비상업용 자격 요건을 인증해야 합니다. 2025년 9월 26일까지 인증하지 않으면 액세스가 보류될 수 있습니다.
  
        
 
       
     
  
  
  
    
  
  
  
    
      ee.Number.clamp
    
    
      
    
    
      
      컬렉션을 사용해 정리하기
    
    
      
      내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
    
  
  
      
    
  
  
  
  
  
    
  
  
    
    
    
  
  
값이 최소에서 최대 범위 내에 있도록 고정합니다.
| 사용 | 반환 값 | 
|---|
| Number.clamp(min, max) | 숫자 | 
| 인수 | 유형 | 세부정보 | 
|---|
| 다음과 같은 경우: number | 숫자 |  | 
| min | 부동 소수점 수 | 클램핑할 최솟값입니다. | 
| max | 부동 소수점 수 | 클램핑할 최댓값입니다. | 
  
  
  예
  
    
  
  
    
    
  
  
  
  
    
    
    
      코드 편집기 (JavaScript)
    
    
  // Numbers within range are unaffected.
print('100 clamped to range [0,255]', ee.Number(100).clamp(0, 255));  // 100
// Numbers greater than max in range are set to max.
print('259 clamped to range [0,255]', ee.Number(259).clamp(0, 255));  // 255
// Numbers less than min in range are set to min.
print('-259 clamped to range [0,255]', ee.Number(-259).clamp(0, 255));  // 0
  
    
  
  
    
  
  
  
  
    
  
    
  Python 설정
  Python API 및 geemap를 사용한 대화형 개발에 관한 자세한 내용은 
    Python 환경 페이지를 참고하세요.
  import ee
import geemap.core as geemap
  
    
    
      Colab (Python)
    
    
  # Numbers within range are unaffected.
# 100
display('100 clamped to range [0,255]:', ee.Number(100).clamp(0, 255))
# Numbers greater than max in range are set to max.
# 255
display('259 clamped to range [0,255]:', ee.Number(259).clamp(0, 255))
# Numbers less than min in range are set to min.
# 0
display('-259 clamped to range [0,255]:', ee.Number(-259).clamp(0, 255))
  
  
  
  
  
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
  최종 업데이트: 2025-10-30(UTC)
  
  
  
    
      [null,null,["최종 업데이트: 2025-10-30(UTC)"],[],["The `clamp(min, max)` function restricts a number within a specified range. It accepts a number, a minimum (`min`), and a maximum (`max`) value as arguments. If the number falls within the `min` and `max` range, it remains unchanged. Numbers exceeding `max` are set to `max`, and those below `min` are set to `min`. The function returns a number. Example, `100` within the range of `0,255` will stay as `100`, while `259` becomes `255` and `-259` becomes `0` in the same range.\n"]]