Test Library

This library contains a lot of classes and functions.

source test.js
author Joe Smith
version 0.1

Constructors

Shape3D()

methods

Shape2D.Triangle.Right(a, b, c)

A triangle with a 90 degree angle.

parameters

type name description
a
b
c

objects

type name description
ratio The ratio.

properties

type name description
number angles The angles.

Shape2D.Polygon(sides)

examples

var myPent = new Polygon(5);
myPent.addSide(s1);
var myHex = new Polygon(5).addSide(s2);

parameters

type name description
sides

methods

ShapeFactory()

ShapeFactory.SquareMaker(size)

parameters

type name description
size

ShapeFactory.SquareMaker.Square(s)

parameters

type name description
s

objects

type name description
size The size.

methods

Objects

Shape2D

This is a library of geometry-related functions.

Shape2D.Triangle.Right.ratio

The ratio.

Shape2D.PI

The constant PI

Geo

A Geo.

methods

number E

The e constant.

integer life

meaning of life?

Functions

getFoo(fooId, r)

Gets the current foo

parameters

type name description
String fooId The unique identifier for the foo.
r (optional) Recursion level.

returns

type description
Object Returns the current foo.

exceptions

type description
MalformedFoo In the case of a fooId not being positve and evenly divisable by 9.

Shape3D.shrink(ratio)

parameters

type name description
ratio

Shape2D.Polygon.addSide(newSide)

parameters

type name description
newSide

Geo.Plane(w, d)

parameters

type name description
w
d