Print Friendly

Class Number

Package:Global
Class:Number
Extends:Object
Defined In:Ext.js

Properties   -  Methods   -  Events

Public Properties

This class has no public properties.

Public Methods

Method Defined By
  constrainNumber min, Number max ) : Number Number
Checks whether or not the current number is within a desired range. If the number is already within the range it is ...

Public Events

This class has no public events.

Method Details

constrain

public function constrain( Number min, Number max )
Checks whether or not the current number is within a desired range. If the number is already within the range it is returned, otherwise the min or max value is returned depending on which side of the range is exceeded. Note that this method returns the constrained value but does not change the current number.
Parameters:
  • min : Number
    The minimum number in the range
  • max : Number
    The maximum number in the range
Returns:
  • Number
    The constrained value if outside the range, otherwise the current value
This method is defined by Number.

Ext - Copyright © 2006-2007 Ext JS, LLC
All rights reserved.