Class

SKRange

The definition of a range of CGFloat values.

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()

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

Constraining Nodes

class SKConstraint

A specification for constraining a node's position or rotation.

class SKReachConstraints

A specification of the degree of freedom when solving inverse kinematics.