Core Plot (iOS and tvOS)
Cocoa plotting framework for macOS, iOS, and tvOS
CPTUtilities.m File Reference
#import "CPTUtilities.h"
#import "CPTLineStyle.h"
#import <tgmath.h>
+ Include dependency graph for CPTUtilities.m:

Macros

#define kCacheSize
 The size of the decimal number cache used by various utility functions. More...
 

Functions

int8_t CPTDecimalCharValue (NSDecimal decimalNumber)
 Converts an NSDecimal value to an 8-bit integer. More...
 
int16_t CPTDecimalShortValue (NSDecimal decimalNumber)
 Converts an NSDecimal value to a 16-bit integer. More...
 
int32_t CPTDecimalLongValue (NSDecimal decimalNumber)
 Converts an NSDecimal value to a 32-bit integer. More...
 
int64_t CPTDecimalLongLongValue (NSDecimal decimalNumber)
 Converts an NSDecimal value to a 64-bit integer. More...
 
int CPTDecimalIntValue (NSDecimal decimalNumber)
 Converts an NSDecimal value to an int. More...
 
NSInteger CPTDecimalIntegerValue (NSDecimal decimalNumber)
 Converts an NSDecimal value to an NSInteger. More...
 
uint8_t CPTDecimalUnsignedCharValue (NSDecimal decimalNumber)
 Converts an NSDecimal value to an unsigned 8-bit integer. More...
 
uint16_t CPTDecimalUnsignedShortValue (NSDecimal decimalNumber)
 Converts an NSDecimal value to an unsigned 16-bit integer. More...
 
uint32_t CPTDecimalUnsignedLongValue (NSDecimal decimalNumber)
 Converts an NSDecimal value to an unsigned 32-bit integer. More...
 
uint64_t CPTDecimalUnsignedLongLongValue (NSDecimal decimalNumber)
 Converts an NSDecimal value to an unsigned 64-bit integer. More...
 
unsigned int CPTDecimalUnsignedIntValue (NSDecimal decimalNumber)
 Converts an NSDecimal value to an unsigned int. More...
 
NSUInteger CPTDecimalUnsignedIntegerValue (NSDecimal decimalNumber)
 Converts an NSDecimal value to an NSUInteger. More...
 
float CPTDecimalFloatValue (NSDecimal decimalNumber)
 Converts an NSDecimal value to a float. More...
 
double CPTDecimalDoubleValue (NSDecimal decimalNumber)
 Converts an NSDecimal value to a double. More...
 
CGFloat CPTDecimalCGFloatValue (NSDecimal decimalNumber)
 Converts an NSDecimal value to a CGFloat. More...
 
NSString *__nonnull CPTDecimalStringValue (NSDecimal decimalNumber)
 Converts an NSDecimal value to an NSString. More...
 
NSDecimal CPTDecimalFromChar (int8_t anInt)
 Converts an 8-bit integer value to an NSDecimal. More...
 
NSDecimal CPTDecimalFromShort (int16_t anInt)
 Converts a 16-bit integer value to an NSDecimal. More...
 
NSDecimal CPTDecimalFromLong (int32_t anInt)
 Converts a 32-bit integer value to an NSDecimal. More...
 
NSDecimal CPTDecimalFromLongLong (int64_t anInt)
 Converts a 64-bit integer value to an NSDecimal. More...
 
NSDecimal CPTDecimalFromInt (int anInt)
 Converts an int value to an NSDecimal. More...
 
NSDecimal CPTDecimalFromInteger (NSInteger anInt)
 Converts an NSInteger value to an NSDecimal. More...
 
NSDecimal CPTDecimalFromUnsignedChar (uint8_t anInt)
 Converts an unsigned 8-bit integer value to an NSDecimal. More...
 
NSDecimal CPTDecimalFromUnsignedShort (uint16_t anInt)
 Converts an unsigned 16-bit integer value to an NSDecimal. More...
 
NSDecimal CPTDecimalFromUnsignedLong (uint32_t anInt)
 Converts an unsigned 32-bit integer value to an NSDecimal. More...
 
NSDecimal CPTDecimalFromUnsignedLongLong (uint64_t anInt)
 Converts an unsigned 64-bit integer value to an NSDecimal. More...
 
NSDecimal CPTDecimalFromUnsignedInt (unsigned int anInt)
 Converts an unsigned int value to an NSDecimal. More...
 
NSDecimal CPTDecimalFromUnsignedInteger (NSUInteger anInt)
 Converts an NSUInteger value to an NSDecimal. More...
 
NSDecimal CPTDecimalFromFloat (float aFloat)
 Converts a float value to an NSDecimal. More...
 
NSDecimal CPTDecimalFromDouble (double aDouble)
 Converts a double value to an NSDecimal. More...
 
NSDecimal CPTDecimalFromCGFloat (CGFloat aCGFloat)
 Converts a CGFloat value to an NSDecimal. More...
 
NSDecimal CPTDecimalFromString (NSString *__nonnull stringRepresentation)
 Parses a string and extracts the numeric value as an NSDecimal. More...
 
NSDecimal CPTDecimalAdd (NSDecimal leftOperand, NSDecimal rightOperand)
 Adds two NSDecimal structs together. More...
 
NSDecimal CPTDecimalSubtract (NSDecimal leftOperand, NSDecimal rightOperand)
 Subtracts one NSDecimal from another. More...
 
NSDecimal CPTDecimalMultiply (NSDecimal leftOperand, NSDecimal rightOperand)
 Multiplies two NSDecimal structs together. More...
 
NSDecimal CPTDecimalDivide (NSDecimal numerator, NSDecimal denominator)
 Divides one NSDecimal by another. More...
 
BOOL CPTDecimalGreaterThan (NSDecimal leftOperand, NSDecimal rightOperand)
 Checks to see if one NSDecimal is greater than another. More...
 
BOOL CPTDecimalGreaterThanOrEqualTo (NSDecimal leftOperand, NSDecimal rightOperand)
 Checks to see if one NSDecimal is greater than or equal to another. More...
 
BOOL CPTDecimalLessThan (NSDecimal leftOperand, NSDecimal rightOperand)
 Checks to see if one NSDecimal is less than another. More...
 
BOOL CPTDecimalLessThanOrEqualTo (NSDecimal leftOperand, NSDecimal rightOperand)
 Checks to see if one NSDecimal is less than or equal to another. More...
 
BOOL CPTDecimalEquals (NSDecimal leftOperand, NSDecimal rightOperand)
 Checks to see if one NSDecimal is equal to another. More...
 
NSDecimal CPTDecimalNaN (void)
 Creates and returns an NSDecimal struct that represents the value “not a number” (NaN). More...
 
NSDecimal CPTDecimalMin (NSDecimal leftOperand, NSDecimal rightOperand)
 Determines the smaller of two NSDecimal values. More...
 
NSDecimal CPTDecimalMax (NSDecimal leftOperand, NSDecimal rightOperand)
 Determines the larger of two NSDecimal values. More...
 
NSDecimal CPTDecimalAbs (NSDecimal value)
 Determines the absolute value of an NSDecimal value. More...
 
NSRange CPTExpandedRange (NSRange range, NSInteger expandBy)
 Expands an NSRange by the given amount. More...
 
CPTRGBAColor CPTRGBAColorFromCGColor (__nonnull CGColorRef color)
 Extracts the color information from a CGColorRef and returns it as a CPTRGBAColor. More...
 
CPTCoordinate CPTOrthogonalCoordinate (CPTCoordinate coord)
 Determines the CPTCoordinate that is orthogonal to the one provided. More...
 
CGPoint CPTAlignPointToUserSpace (__nonnull CGContextRef context, CGPoint point)
 Aligns a point in user space to integral coordinates in device space. More...
 
CGSize CPTAlignSizeToUserSpace (__nonnull CGContextRef context, CGSize size)
 Adjusts a size in user space to integral dimensions in device space. More...
 
CGRect CPTAlignRectToUserSpace (__nonnull CGContextRef context, CGRect rect)
 Aligns a rectangle in user space to integral coordinates in device space. More...
 
CGPoint CPTAlignIntegralPointToUserSpace (__nonnull CGContextRef context, CGPoint point)
 Aligns a point in user space between integral coordinates in device space. More...
 
CGRect CPTAlignIntegralRectToUserSpace (__nonnull CGContextRef context, CGRect rect)
 Aligns a rectangle in user space between integral coordinates in device space. More...
 
CGRect CPTAlignBorderedRectToUserSpace (__nonnull CGContextRef context, CGRect rect, CPTLineStyle *__nonnull borderLineStyle)
 
NSString *__nonnull CPTStringFromPoint (CGPoint point)
 Creates a string representation of the given point. More...
 
NSString *__nonnull CPTStringFromSize (CGSize size)
 Creates a string representation of the given size. More...
 
NSString *__nonnull CPTStringFromRect (CGRect rect)
 Creates a string representation of the given rectangle. More...
 
NSString *__nonnull CPTStringFromVector (CGVector vector)
 Creates a string representation of the given vector. More...
 
CGFloat squareOfDistanceBetweenPoints (CGPoint point1, CGPoint point2)
 Computes the square of the distance between two points. More...
 
CPTEdgeInsets CPTEdgeInsetsMake (CGFloat top, CGFloat left, CGFloat bottom, CGFloat right)
 Returns a CPTEdgeInsets struct with the given insets. More...
 
BOOL CPTEdgeInsetsEqualToEdgeInsets (CPTEdgeInsets insets1, CPTEdgeInsets insets2)
 Compares two CPTEdgeInsets structstructs. More...
 
double CPTLogModulus (double value)
 Computes the log modulus of the given value. More...
 
double CPTInverseLogModulus (double value)
 Computes the inverse log modulus of the given value. More...
 

Macro Definition Documentation

◆ kCacheSize

#define kCacheSize

The size of the decimal number cache used by various utility functions.

Function Documentation

◆ CPTAlignBorderedRectToUserSpace()

CGRect CPTAlignBorderedRectToUserSpace ( __nonnull CGContextRef  context,
CGRect  rect,
CPTLineStyle *__nonnull  borderLineStyle 
)

◆ CPTAlignIntegralPointToUserSpace()

CGPoint CPTAlignIntegralPointToUserSpace ( __nonnull CGContextRef  context,
CGPoint  point 
)

Aligns a point in user space between integral coordinates in device space.

Ensures that the x and y coordinates are between pixels in device space.

Parameters
contextThe graphics context.
pointThe point in user space.
Returns
The device aligned point in user space.

◆ CPTAlignIntegralRectToUserSpace()

CGRect CPTAlignIntegralRectToUserSpace ( __nonnull CGContextRef  context,
CGRect  rect 
)

Aligns a rectangle in user space between integral coordinates in device space.

Ensures that the x and y coordinates are between pixels in device space and the width and height are an integer number of device pixels.

Parameters
contextThe graphics context.
rectThe rectangle in user space.
Returns
The device aligned rectangle in user space.

◆ CPTAlignPointToUserSpace()

CGPoint CPTAlignPointToUserSpace ( __nonnull CGContextRef  context,
CGPoint  point 
)

Aligns a point in user space to integral coordinates in device space.

Ensures that the x and y coordinates are at a pixel corner in device space. Drawn from Programming with Quartz by D. Gelphman, B. Laden.

Parameters
contextThe graphics context.
pointThe point in user space.
Returns
The device aligned point in user space.

◆ CPTAlignRectToUserSpace()

CGRect CPTAlignRectToUserSpace ( __nonnull CGContextRef  context,
CGRect  rect 
)

Aligns a rectangle in user space to integral coordinates in device space.

Ensures that the x and y coordinates are at a pixel corner in device space and the width and height are an integer number of device pixels. Drawn from Programming with Quartz by D. Gelphman, B. Laden.

Parameters
contextThe graphics context.
rectThe rectangle in user space.
Returns
The device aligned rectangle in user space.

◆ CPTAlignSizeToUserSpace()

CGSize CPTAlignSizeToUserSpace ( __nonnull CGContextRef  context,
CGSize  size 
)

Adjusts a size in user space to integral dimensions in device space.

Ensures that the width and height are an integer number of device pixels. Drawn from Programming with Quartz by D. Gelphman, B. Laden.

Parameters
contextThe graphics context.
sizeThe size in user space.
Returns
The device aligned size in user space.

◆ CPTDecimalAbs()

NSDecimal CPTDecimalAbs ( NSDecimal  value)

Determines the absolute value of an NSDecimal value.

Parameters
valueThe input value for the calculation.
Returns
The absolute value of the argument.

◆ CPTDecimalAdd()

NSDecimal CPTDecimalAdd ( NSDecimal  leftOperand,
NSDecimal  rightOperand 
)

Adds two NSDecimal structs together.

Parameters
leftOperandThe left-hand side of the addition operation.
rightOperandThe right-hand side of the addition operation.
Returns
The result of the addition.

◆ CPTDecimalCGFloatValue()

CGFloat CPTDecimalCGFloatValue ( NSDecimal  decimalNumber)

Converts an NSDecimal value to a CGFloat.

Parameters
decimalNumberThe NSDecimal value.
Returns
The converted value.

◆ CPTDecimalCharValue()

int8_t CPTDecimalCharValue ( NSDecimal  decimalNumber)

Converts an NSDecimal value to an 8-bit integer.

Parameters
decimalNumberThe NSDecimal value.
Returns
The converted value.

◆ CPTDecimalDivide()

NSDecimal CPTDecimalDivide ( NSDecimal  numerator,
NSDecimal  denominator 
)

Divides one NSDecimal by another.

Parameters
numeratorThe numerator of the multiplication operation.
denominatorThe denominator of the multiplication operation.
Returns
The result of the division.

◆ CPTDecimalDoubleValue()

double CPTDecimalDoubleValue ( NSDecimal  decimalNumber)

Converts an NSDecimal value to a double.

Parameters
decimalNumberThe NSDecimal value.
Returns
The converted value.

◆ CPTDecimalEquals()

BOOL CPTDecimalEquals ( NSDecimal  leftOperand,
NSDecimal  rightOperand 
)

Checks to see if one NSDecimal is equal to another.

Parameters
leftOperandThe left side of the comparison.
rightOperandThe right side of the comparison.
Returns
YES if the left operand is equal to the right, NO otherwise.

◆ CPTDecimalFloatValue()

float CPTDecimalFloatValue ( NSDecimal  decimalNumber)

Converts an NSDecimal value to a float.

Parameters
decimalNumberThe NSDecimal value.
Returns
The converted value.

◆ CPTDecimalFromCGFloat()

NSDecimal CPTDecimalFromCGFloat ( CGFloat  aCGFloat)

Converts a CGFloat value to an NSDecimal.

Parameters
aCGFloatThe CGFloat value.
Returns
The converted value.

◆ CPTDecimalFromChar()

NSDecimal CPTDecimalFromChar ( int8_t  anInt)

Converts an 8-bit integer value to an NSDecimal.

Parameters
anIntThe integer value.
Returns
The converted value.

◆ CPTDecimalFromDouble()

NSDecimal CPTDecimalFromDouble ( double  aDouble)

Converts a double value to an NSDecimal.

Parameters
aDoubleThe double value.
Returns
The converted value.

◆ CPTDecimalFromFloat()

NSDecimal CPTDecimalFromFloat ( float  aFloat)

Converts a float value to an NSDecimal.

Parameters
aFloatThe float value.
Returns
The converted value.

◆ CPTDecimalFromInt()

NSDecimal CPTDecimalFromInt ( int  anInt)

Converts an int value to an NSDecimal.

Parameters
anIntThe int value.
Returns
The converted value.

◆ CPTDecimalFromInteger()

NSDecimal CPTDecimalFromInteger ( NSInteger  anInt)

Converts an NSInteger value to an NSDecimal.

Parameters
anIntThe NSInteger value.
Returns
The converted value.

◆ CPTDecimalFromLong()

NSDecimal CPTDecimalFromLong ( int32_t  anInt)

Converts a 32-bit integer value to an NSDecimal.

Parameters
anIntThe integer value.
Returns
The converted value.

◆ CPTDecimalFromLongLong()

NSDecimal CPTDecimalFromLongLong ( int64_t  anInt)

Converts a 64-bit integer value to an NSDecimal.

Parameters
anIntThe integer value.
Returns
The converted value.

◆ CPTDecimalFromShort()

NSDecimal CPTDecimalFromShort ( int16_t  anInt)

Converts a 16-bit integer value to an NSDecimal.

Parameters
anIntThe integer value.
Returns
The converted value.

◆ CPTDecimalFromString()

NSDecimal CPTDecimalFromString ( NSString *__nonnull  stringRepresentation)

Parses a string and extracts the numeric value as an NSDecimal.

Parameters
stringRepresentationThe string value.
Returns
The numeric value extracted from the string.

◆ CPTDecimalFromUnsignedChar()

NSDecimal CPTDecimalFromUnsignedChar ( uint8_t  anInt)

Converts an unsigned 8-bit integer value to an NSDecimal.

Parameters
anIntThe unsigned integer value.
Returns
The converted value.

◆ CPTDecimalFromUnsignedInt()

NSDecimal CPTDecimalFromUnsignedInt ( unsigned int  anInt)

Converts an unsigned int value to an NSDecimal.

Parameters
anIntThe unsigned int value.
Returns
The converted value.

◆ CPTDecimalFromUnsignedInteger()

NSDecimal CPTDecimalFromUnsignedInteger ( NSUInteger  anInt)

Converts an NSUInteger value to an NSDecimal.

Parameters
anIntThe NSUInteger value.
Returns
The converted value.

◆ CPTDecimalFromUnsignedLong()

NSDecimal CPTDecimalFromUnsignedLong ( uint32_t  anInt)

Converts an unsigned 32-bit integer value to an NSDecimal.

Parameters
anIntThe unsigned integer value.
Returns
The converted value.

◆ CPTDecimalFromUnsignedLongLong()

NSDecimal CPTDecimalFromUnsignedLongLong ( uint64_t  anInt)

Converts an unsigned 64-bit integer value to an NSDecimal.

Parameters
anIntThe unsigned integer value.
Returns
The converted value.

◆ CPTDecimalFromUnsignedShort()

NSDecimal CPTDecimalFromUnsignedShort ( uint16_t  anInt)

Converts an unsigned 16-bit integer value to an NSDecimal.

Parameters
anIntThe unsigned integer value.
Returns
The converted value.

◆ CPTDecimalGreaterThan()

BOOL CPTDecimalGreaterThan ( NSDecimal  leftOperand,
NSDecimal  rightOperand 
)

Checks to see if one NSDecimal is greater than another.

Parameters
leftOperandThe left side of the comparison.
rightOperandThe right side of the comparison.
Returns
YES if the left operand is greater than the right, NO otherwise.

◆ CPTDecimalGreaterThanOrEqualTo()

BOOL CPTDecimalGreaterThanOrEqualTo ( NSDecimal  leftOperand,
NSDecimal  rightOperand 
)

Checks to see if one NSDecimal is greater than or equal to another.

Parameters
leftOperandThe left side of the comparison.
rightOperandThe right side of the comparison.
Returns
YES if the left operand is greater than or equal to the right, NO otherwise.

◆ CPTDecimalIntegerValue()

NSInteger CPTDecimalIntegerValue ( NSDecimal  decimalNumber)

Converts an NSDecimal value to an NSInteger.

Parameters
decimalNumberThe NSDecimal value.
Returns
The converted value.

◆ CPTDecimalIntValue()

int CPTDecimalIntValue ( NSDecimal  decimalNumber)

Converts an NSDecimal value to an int.

Parameters
decimalNumberThe NSDecimal value.
Returns
The converted value.

◆ CPTDecimalLessThan()

BOOL CPTDecimalLessThan ( NSDecimal  leftOperand,
NSDecimal  rightOperand 
)

Checks to see if one NSDecimal is less than another.

Parameters
leftOperandThe left side of the comparison.
rightOperandThe right side of the comparison.
Returns
YES if the left operand is less than the right, NO otherwise.

◆ CPTDecimalLessThanOrEqualTo()

BOOL CPTDecimalLessThanOrEqualTo ( NSDecimal  leftOperand,
NSDecimal  rightOperand 
)

Checks to see if one NSDecimal is less than or equal to another.

Parameters
leftOperandThe left side of the comparison.
rightOperandThe right side of the comparison.
Returns
YES if the left operand is less than or equal to the right, NO otherwise.

◆ CPTDecimalLongLongValue()

int64_t CPTDecimalLongLongValue ( NSDecimal  decimalNumber)

Converts an NSDecimal value to a 64-bit integer.

Parameters
decimalNumberThe NSDecimal value.
Returns
The converted value.

◆ CPTDecimalLongValue()

int32_t CPTDecimalLongValue ( NSDecimal  decimalNumber)

Converts an NSDecimal value to a 32-bit integer.

Parameters
decimalNumberThe NSDecimal value.
Returns
The converted value.

◆ CPTDecimalMax()

NSDecimal CPTDecimalMax ( NSDecimal  leftOperand,
NSDecimal  rightOperand 
)

Determines the larger of two NSDecimal values.

Parameters
leftOperandThe first value to compare.
rightOperandThe second value to compare.
Returns
The larger of the two arguments.

◆ CPTDecimalMin()

NSDecimal CPTDecimalMin ( NSDecimal  leftOperand,
NSDecimal  rightOperand 
)

Determines the smaller of two NSDecimal values.

Parameters
leftOperandThe first value to compare.
rightOperandThe second value to compare.
Returns
The smaller of the two arguments.

◆ CPTDecimalMultiply()

NSDecimal CPTDecimalMultiply ( NSDecimal  leftOperand,
NSDecimal  rightOperand 
)

Multiplies two NSDecimal structs together.

Parameters
leftOperandThe left-hand side of the multiplication operation.
rightOperandThe right-hand side of the multiplication operation.
Returns
The result of the multiplication.

◆ CPTDecimalNaN()

NSDecimal CPTDecimalNaN ( void  )

Creates and returns an NSDecimal struct that represents the value “not a number” (NaN).

Calling NSDecimalIsNotANumber() on this value will return YES.

Returns
An NSDecimal struct that represents the value “not a number” (NaN).

◆ CPTDecimalShortValue()

int16_t CPTDecimalShortValue ( NSDecimal  decimalNumber)

Converts an NSDecimal value to a 16-bit integer.

Parameters
decimalNumberThe NSDecimal value.
Returns
The converted value.

◆ CPTDecimalStringValue()

NSString* __nonnull CPTDecimalStringValue ( NSDecimal  decimalNumber)

Converts an NSDecimal value to an NSString.

Parameters
decimalNumberThe NSDecimal value.
Returns
The converted value.

◆ CPTDecimalSubtract()

NSDecimal CPTDecimalSubtract ( NSDecimal  leftOperand,
NSDecimal  rightOperand 
)

Subtracts one NSDecimal from another.

Parameters
leftOperandThe left-hand side of the subtraction operation.
rightOperandThe right-hand side of the subtraction operation.
Returns
The result of the subtraction.

◆ CPTDecimalUnsignedCharValue()

uint8_t CPTDecimalUnsignedCharValue ( NSDecimal  decimalNumber)

Converts an NSDecimal value to an unsigned 8-bit integer.

Parameters
decimalNumberThe NSDecimal value.
Returns
The converted value.

◆ CPTDecimalUnsignedIntegerValue()

NSUInteger CPTDecimalUnsignedIntegerValue ( NSDecimal  decimalNumber)

Converts an NSDecimal value to an NSUInteger.

Parameters
decimalNumberThe NSDecimal value.
Returns
The converted value.

◆ CPTDecimalUnsignedIntValue()

unsigned int CPTDecimalUnsignedIntValue ( NSDecimal  decimalNumber)

Converts an NSDecimal value to an unsigned int.

Parameters
decimalNumberThe NSDecimal value.
Returns
The converted value.

◆ CPTDecimalUnsignedLongLongValue()

uint64_t CPTDecimalUnsignedLongLongValue ( NSDecimal  decimalNumber)

Converts an NSDecimal value to an unsigned 64-bit integer.

Parameters
decimalNumberThe NSDecimal value.
Returns
The converted value.

◆ CPTDecimalUnsignedLongValue()

uint32_t CPTDecimalUnsignedLongValue ( NSDecimal  decimalNumber)

Converts an NSDecimal value to an unsigned 32-bit integer.

Parameters
decimalNumberThe NSDecimal value.
Returns
The converted value.

◆ CPTDecimalUnsignedShortValue()

uint16_t CPTDecimalUnsignedShortValue ( NSDecimal  decimalNumber)

Converts an NSDecimal value to an unsigned 16-bit integer.

Parameters
decimalNumberThe NSDecimal value.
Returns
The converted value.

◆ CPTEdgeInsetsEqualToEdgeInsets()

BOOL CPTEdgeInsetsEqualToEdgeInsets ( CPTEdgeInsets  insets1,
CPTEdgeInsets  insets2 
)

Compares two CPTEdgeInsets structstructs.

Parameters
insets1The first inset.
insets2The second inset.
Returns
YES if the two CPTEdgeInsets structs are equal.

◆ CPTEdgeInsetsMake()

CPTEdgeInsets CPTEdgeInsetsMake ( CGFloat  top,
CGFloat  left,
CGFloat  bottom,
CGFloat  right 
)

Returns a CPTEdgeInsets struct with the given insets.

Parameters
topThe top inset.
leftThe left inset.
bottomThe bottom inset.
rightThe right inset.
Returns
A CPTEdgeInsets struct with the given insets.

◆ CPTExpandedRange()

NSRange CPTExpandedRange ( NSRange  range,
NSInteger  expandBy 
)

Expands an NSRange by the given amount.

The location of the resulting NSRange will be non-negative.

Parameters
rangeThe NSRange to expand.
expandByThe amount the expand the range by.
Returns
The expanded range.

◆ CPTInverseLogModulus()

double CPTInverseLogModulus ( double  value)

Computes the inverse log modulus of the given value.

Parameters
valueThe value.
Returns
The inverse log modulus of the given value.

◆ CPTLogModulus()

double CPTLogModulus ( double  value)

Computes the log modulus of the given value.

Parameters
valueThe value.
Returns
The log modulus of the given value.
See also
A log transformation of positive and negative values for more information about the log-modulus transformation.

◆ CPTOrthogonalCoordinate()

CPTCoordinate CPTOrthogonalCoordinate ( CPTCoordinate  coord)

Determines the CPTCoordinate that is orthogonal to the one provided.

The current implementation is two-dimensional—X is orthogonal to Y and Y is orthogonal to X.

Parameters
coordThe CPTCoordinate.
Returns
The orthogonal CPTCoordinate.

◆ CPTRGBAColorFromCGColor()

CPTRGBAColor CPTRGBAColorFromCGColor ( __nonnull CGColorRef  color)

Extracts the color information from a CGColorRef and returns it as a CPTRGBAColor.

Supports RGBA and grayscale color spaces.

Parameters
colorThe color.
Returns
The RGBA components of the color.

◆ CPTStringFromPoint()

NSString* __nonnull CPTStringFromPoint ( CGPoint  point)

Creates a string representation of the given point.

Parameters
pointThe point.
Returns
A string with the format {x, y}.

◆ CPTStringFromRect()

NSString* __nonnull CPTStringFromRect ( CGRect  rect)

Creates a string representation of the given rectangle.

Parameters
rectThe rectangle.
Returns
A string with the format {{x, y}, {width, height}}.

◆ CPTStringFromSize()

NSString* __nonnull CPTStringFromSize ( CGSize  size)

Creates a string representation of the given size.

Parameters
sizeThe size.
Returns
A string with the format {width, height}.

◆ CPTStringFromVector()

NSString* __nonnull CPTStringFromVector ( CGVector  vector)

Creates a string representation of the given vector.

Parameters
vectorThe vector.
Returns
A string with the format {dx, dy}.

◆ squareOfDistanceBetweenPoints()

CGFloat squareOfDistanceBetweenPoints ( CGPoint  point1,
CGPoint  point2 
)

Computes the square of the distance between two points.

Parameters
point1The first point.
point2The second point.
Returns
The square of the distance between the two points.