GeomUtil

Kind of class:public class
Package:org.casalib.util
Inherits from:none
Version:04/27/08
Author:Aaron Clinger
Classpath:org.casalib.util.GeomUtil
File last modified:Wednesday, 31 December 2008, 20:18:28
Utilities for positioning, calculating and manipulating geometeric shapes.

Summary


Class methods
  • rotatePoint (point:Point, centerPoint:Point, angle:Number) : void
    • Rotates a Point around another Point by the specified angle.
  • angle (first:Point, second:Point) : Number
    • Determines the angle/degree between the first and second point.
  • getRectanglePerimeter (rect:Rectangle) : Number
    • Calculates the perimeter of a rectangle.

Class methods

angle

public static function angle (
first:Point, second:Point) : Number

Determines the angle/degree between the first and second point.
Parameters:
first :
The first Point.
second:
The second Point.
Returns:
  • The degree between the two points.

getRectanglePerimeter

public static function getRectanglePerimeter (
rect:Rectangle) : Number

Calculates the perimeter of a rectangle.
Parameters:
rect:
Rectangle to determine the perimeter of.

rotatePoint

public static function rotatePoint (
point:Point, centerPoint:Point, angle:Number) : void

Rotates a Point around another Point by the specified angle.
Parameters:
point :
The Point to rotate.
centerPoint:
The Point to rotate this Point around.
angle :
The angle (in degrees) to rotate this point.