Access keys

PointUtils

Kind of class: class
Inherits from: none
Classpath: org.asapframework.util.PointUtils
File last modified: Saturday, 07 October 2006, 23:53:43
Point utility methods.

Summary

Class methods

Class methods

average

static function average (
a:Point, b:Point) : Point
Calculates the average of two points and creates a new Point with the result.
Parameters:
a:
the first Point
b:
the second Point
Returns:
A new Point with the average of Point a and Point b.

multiply

static function multiply (
inPoint:Point, inFactor:Number) : Point
Mutliplies the coordinates of the given Point and creates a new Point with the result.
Parameters:
inPoint :
the Point to multiply
inFactor:
the multiply factor
Returns:
The new Point.
Usage:
var point:Point = new Point(100,200);
var newPoint:Point = PointUtils.multiply(point, 0.5); // (50,100)