Class

SKRange

A definition of a range of floating-point values.

Declaration

class SKRange : NSObject

Overview

You typically use a SKRange to clamp a value so that it is within the specified range.

Topics

Creating a Range Object

init(value: CGFloat, variance: CGFloat)

Creates and initializes a new range object using a value and a maximum distance from that value.

class func withNoLimits() -> Self

Creates and initializes a new range object that encompasses all possible values.

init(lowerLimit: CGFloat)

Creates and initializes a new range object that specifies only a minimum value.

init(upperLimit: CGFloat)

Creates and initializes a new range object that specifies only a maximum value.

init(constantValue: CGFloat)

Creates and initializes a new range object that specifies a constant value.

init(lowerLimit: CGFloat, upperLimit: CGFloat)

Initializes a new range object.

Inspecting a Range Object’s Limits

var lowerLimit: CGFloat

The minimum possible value.

var upperLimit: CGFloat

The maximum possible value.

Relationships

Inherits From

See Also

Mathematical Tools

class SKKeyframeSequence

An object that performs interpolation between values specified at different times (keyframes).

class SKRegion

The definition of an arbitrary area.