maxGreaterThan()

Checks whether the value is less than the maximum range of a specified `Range` object

Range.prototype.maxGreaterThan()

The maxGreaterThan() method checks whether the value is less than the maximum range of a specified Range object.

range.class.ts
public maxGreaterThan(value: number): boolean {
  return this.#maximum.greaterThan(value);
}

Parameters

value:number

The value of number type to test.

Return type

Returns

The return value is a boolean type indicating whether the given value is less than maximum range of a specified Range object.

Example usage

// Example usage.
import { Range } from '@angular-package/range';

// Create new instance.
const range = new Range(4, 27);

// Returns true.
range.maxGreaterThan(26);

// Returns false.
range.maxGreaterThan(27);

Last updated