//
//  ANGeometryHelper.h
//  AvisNocturnaCrossCore
//
//  Created by Mendel Kucharzeck on 04.01.12.
//  Copyright 2012 AvisNocturna Software. All rights reserved.
//

@interface ANGeometryHelper : NSObject

+ (float) angleOfRayX:(float)x andY:(float)y;   //RADIANS!
+ (float) angleDifferenceOfRayFromPoint1:(CGPoint)p1 toPoint2:(CGPoint)p2 andPoint3:(CGPoint)p3;    //Difference in angle between p1->p2 and p2->p3, DEGREES!

+ (CGPoint) rotatePoint:(CGPoint)rotatePoint withCenterPoint:(CGPoint)originPoint withDegrees:(double)degrees;  //DEGREES!

+ (CGRect) scaleRect:(CGRect)rect factor:(float)factor;
+ (CGRect) scaleRectAroundCenter:(CGRect)rect factor:(float)factor;
+ (CGRect) ceilRect:(CGRect)rect;

+ (CGPoint) scalePoint:(CGPoint)point withCenter:(CGPoint)center withFactor:(float)factor;

+ (CGRect) centerRect:(CGRect)rect inRect:(CGRect)bounds;
+ (CGRect) scaledRectInBounds:(CGRect)bounds size:(CGSize)size;
+ (CGRect) fittedRectInBounds:(CGRect)bounds size:(CGSize)size;
+ (CGSize) proportionallyScaleSize:(CGSize)size toFitInSize:(CGSize)bounds;

@end
