The Geometry.jsm
JavaScript code module provides routines for performing common geometry operations on points and rectangles. It exports two classes: Point
and Rect
.
To use these routines, you first need to import the code module into your JavaScript scope:
Components.utils.import("resource://gre/modules/Geometry.jsm");
Once you've imported the module, you can then use the Point
and Rect
classes.