source: orbit/iOS/Orbit/Orbit/CorePlotHeaders/CPTUtilities.h @ cef53d8

ServoTab_Interfacepyramid
Last change on this file since cef53d8 was a9059a5, checked in by Steve Castellotti <sc@…>, 10 years ago

Arduino:

  • updated to permit custom setting of Throttle, Yaw, and Pitch

Android:

  • Minor tweak to Configuration location

iOS:

  • Property mode set to 100644
File size: 3.8 KB
Line 
1#import "CPTDefinitions.h"
2#import <Foundation/Foundation.h>
3
4/// @file
5
6#if __cplusplus
7extern "C" {
8#endif
9
10/// @name Convert NSDecimal to Primitive Types
11/// @{
12int8_t CPTDecimalCharValue(NSDecimal decimalNumber);
13int16_t CPTDecimalShortValue(NSDecimal decimalNumber);
14int32_t CPTDecimalLongValue(NSDecimal decimalNumber);
15int64_t CPTDecimalLongLongValue(NSDecimal decimalNumber);
16int CPTDecimalIntValue(NSDecimal decimalNumber);
17NSInteger CPTDecimalIntegerValue(NSDecimal decimalNumber);
18
19uint8_t CPTDecimalUnsignedCharValue(NSDecimal decimalNumber);
20uint16_t CPTDecimalUnsignedShortValue(NSDecimal decimalNumber);
21uint32_t CPTDecimalUnsignedLongValue(NSDecimal decimalNumber);
22uint64_t CPTDecimalUnsignedLongLongValue(NSDecimal decimalNumber);
23unsigned int CPTDecimalUnsignedIntValue(NSDecimal decimalNumber);
24NSUInteger CPTDecimalUnsignedIntegerValue(NSDecimal decimalNumber);
25
26float CPTDecimalFloatValue(NSDecimal decimalNumber);
27double CPTDecimalDoubleValue(NSDecimal decimalNumber);
28CGFloat CPTDecimalCGFloatValue(NSDecimal decimalNumber);
29
30NSString *CPTDecimalStringValue(NSDecimal decimalNumber);
31
32/// @}
33
34/// @name Convert Primitive Types to NSDecimal
35/// @{
36NSDecimal CPTDecimalFromChar(int8_t anInt);
37NSDecimal CPTDecimalFromShort(int16_t anInt);
38NSDecimal CPTDecimalFromLong(int32_t anInt);
39NSDecimal CPTDecimalFromLongLong(int64_t anInt);
40NSDecimal CPTDecimalFromInt(int i);
41NSDecimal CPTDecimalFromInteger(NSInteger i);
42
43NSDecimal CPTDecimalFromUnsignedChar(uint8_t i);
44NSDecimal CPTDecimalFromUnsignedShort(uint16_t i);
45NSDecimal CPTDecimalFromUnsignedLong(uint32_t i);
46NSDecimal CPTDecimalFromUnsignedLongLong(uint64_t i);
47NSDecimal CPTDecimalFromUnsignedInt(unsigned int i);
48NSDecimal CPTDecimalFromUnsignedInteger(NSUInteger i);
49
50NSDecimal CPTDecimalFromFloat(float aFloat);
51NSDecimal CPTDecimalFromDouble(double aDouble);
52NSDecimal CPTDecimalFromCGFloat(CGFloat aCGFloat);
53
54NSDecimal CPTDecimalFromString(NSString *stringRepresentation);
55
56/// @}
57
58/// @name NSDecimal Arithmetic
59/// @{
60NSDecimal CPTDecimalAdd(NSDecimal leftOperand, NSDecimal rightOperand);
61NSDecimal CPTDecimalSubtract(NSDecimal leftOperand, NSDecimal rightOperand);
62NSDecimal CPTDecimalMultiply(NSDecimal leftOperand, NSDecimal rightOperand);
63NSDecimal CPTDecimalDivide(NSDecimal numerator, NSDecimal denominator);
64
65/// @}
66
67/// @name NSDecimal Comparison
68/// @{
69BOOL CPTDecimalGreaterThan(NSDecimal leftOperand, NSDecimal rightOperand);
70BOOL CPTDecimalGreaterThanOrEqualTo(NSDecimal leftOperand, NSDecimal rightOperand);
71BOOL CPTDecimalLessThan(NSDecimal leftOperand, NSDecimal rightOperand);
72BOOL CPTDecimalLessThanOrEqualTo(NSDecimal leftOperand, NSDecimal rightOperand);
73BOOL CPTDecimalEquals(NSDecimal leftOperand, NSDecimal rightOperand);
74
75/// @}
76
77/// @name NSDecimal Utilities
78/// @{
79NSDecimal CPTDecimalNaN(void);
80
81/// @}
82
83/// @name Ranges
84/// @{
85NSRange CPTExpandedRange(NSRange range, NSInteger expandBy);
86
87/// @}
88
89/// @name Coordinates
90/// @{
91CPTCoordinate CPTOrthogonalCoordinate(CPTCoordinate coord);
92
93/// @}
94
95/// @name Gradient Colors
96/// @{
97CPTRGBAColor CPTRGBAColorFromCGColor(CGColorRef color);
98
99/// @}
100
101/// @name Quartz Pixel-Alignment Functions
102/// @{
103CGPoint CPTAlignPointToUserSpace(CGContextRef context, CGPoint point);
104CGSize CPTAlignSizeToUserSpace(CGContextRef context, CGSize size);
105CGRect CPTAlignRectToUserSpace(CGContextRef context, CGRect rect);
106
107CGPoint CPTAlignIntegralPointToUserSpace(CGContextRef context, CGPoint point);
108CGRect CPTAlignIntegralRectToUserSpace(CGContextRef context, CGRect rect);
109
110/// @}
111
112/// @name String Formatting for Core Graphics Structs
113/// @{
114NSString *CPTStringFromPoint(CGPoint point);
115NSString *CPTStringFromSize(CGSize size);
116NSString *CPTStringFromRect(CGRect rect);
117
118/// @}
119
120/// @name CGPoint Utilities
121/// @{
122CGFloat squareOfDistanceBetweenPoints(CGPoint point1, CGPoint point2);
123
124/// @}
125
126#if __cplusplus
127}
128#endif
Note: See TracBrowser for help on using the repository browser.