 		}
 		
 		/**
+		 * Anchors the object to a position.
+		 * @param	object		The object to anchor.
+		 * @param	anchor		The anchor object.
+		 * @param	distance	The max distance object can be anchored to the anchor.
+		 */
+		public static function anchorTo(object:Object, anchor:Object, distance:Number = 0):void
+		{
+			point.x = object.x - anchor.x;
+			point.y = object.y - anchor.y;
+			if (point.length > distance) point.normalize(distance);
+			object.x = anchor.x + point.x;
+			object.y = anchor.y + point.y;
+		}
+		
+		/**
 		 * Finds the angle (in degrees) from point 1 to point 2.
 		 * @param	x1		The first x-position.
 		 * @param	y1		The first y-position.

		 * @param	object		The object whose x/y properties should be set.
		 * @param	angle		The angle of the vector, in degrees.
		 * @param	length		The distance to the vector from (0, 0).
		 */
		public static function angleXY(object:Object, angle:Number, length:Number = 1):void
		{
			angle *= RAD;
			object.x = Math.cos(angle) * length;
			object.y = Math.sin(angle) * length;
		}
		
		/**

			}
			value = value < min ? value : min;
			return value > max ? value : max;
		}
		
		/**
		 * Clamps the object inside the rectangle.
		 * @param	object		The object to clamp (must have an x and y property).
		 * @param	x			Rectangle's x.
		 * @param	y			Rectangle's y.
		 * @param	width		Rectangle's width.
		 * @param	height		Rectangle's height.
		 */
		public static function clampInRect(object:Object, x:Number, y:Number, width:Number, height:Number, padding:Number):void
		{
			object.x = clamp(object.x, x + padding, x + width - padding);
			object.y = clamp(object.y, y + padding, y + height - padding);
		}
		
		/**
