Home Reference Source
public class | source

Span

Direct Subclass:

ArraySpan, ColorSpan

Constructor Summary

Public Constructor
public

constructor(a: Number | Array, b: Number, center: Number)

Span Class.

Member Summary

Public Members
public

a: *

public

b: *

public

The class type.

Private Members
private

_center: *

private

Method Summary

Public Methods
public

Span.getValue function

Public Constructors

public constructor(a: Number | Array, b: Number, center: Number) source

Span Class. Get a random Number from a to b. Or from c-a to c+b

Params:

NameTypeAttributeDescription
a Number | Array

min number

b Number

max number

center Number

the center's z value

Example:

var span = new Span(0,30);
or
var span = new Span(["#fff","#ff0","#000"]);
or
var span = new Span(5,1,"center");

Public Members

public a: * source

public b: * source

public type: string source

The class type.

Private Members

private _center: * source

private _isArray: boolean source

Public Methods

public getValue(INT: number): number source

Span.getValue function

Params:

NameTypeAttributeDescription
INT number

or int

Return:

number

a random Number