EngineKit
Angle Class Reference

#import <Angle.h>

Inheritance diagram for Angle:

Instance Methods

(instancetype) - initWithRadians:
 
(instancetype) - initWithDegrees:
 
(CGFloat) - toRadians
 
(CGFloat) - toDegrees
 

Class Methods

(instancetype) + angleWithRadians:
 
(instancetype) + angleWithDegrees:
 
(instancetype) + angleWithPiTimes:
 

Detailed Description

Represents an Angle, usually for a Rotation. Used mostly for initialization and conversion. More efficient when used exclusively with radians, but not slow unless used in a very tight loop.

Method Documentation

+ (instancetype) angleWithDegrees: (CGFloat)  degrees

Creates an Angle object with the given value in degrees.

Parameters
degreesAn angle measured in degrees.
Returns
An initialized Angle object.
+ (instancetype) angleWithPiTimes: (CGFloat)  ratio

Creates an Angle object with the value of ratio*pi, measured in radians.

Parameters
ratioThe value used to multiply by pi.
Returns
An initialized Angle object.
+ (instancetype) angleWithRadians: (CGFloat)  radians

Creates an Angle object with the given value in radians.

Parameters
radiansAn angle measured in radians.
Returns
An initialized Angle object.
- (instancetype) initWithDegrees: (CGFloat)  degrees

Creates an Angle object with the given value in degrees.

Parameters
degreesAn angle measured in degrees.
Returns
An initialized Angle object.
- (instancetype) initWithRadians: (CGFloat)  radians

Creates an Angle object with the given value in radians.

Parameters
radiansAn angle measured in radians.
Returns
An initialized Angle object.
- (CGFloat) toDegrees

Converts the value of the Angle to degrees.

Returns
The Angle's value, measured in degrees.
- (CGFloat) toRadians

Converts the value of the Angle to radians.

Returns
The Angle's value, measured in radians.

The documentation for this class was generated from the following files: