Documentation

include MVC MVC.Animate MVC.Class MVC.Controller MVC.Controller.Action MVC.Controller.Action.Drag MVC.Controller.Action.Drop MVC.Controller.Action.EnterLeave MVC.Controller.Action.Event MVC.Controller.Action.Hover MVC.Controller.Action.Lasso MVC.Controller.Action.Selectable MVC.Controller.Action.Subscribe MVC.Controller.Comet MVC.Controller.Params MVC.Controller.Params.Drag MVC.Controller.Params.Drop MVC.Controller.Stateful MVC.Delegator MVC.Doc MVC.Element MVC.Event MVC.File MVC.History MVC.IO MVC.IO.Ajax MVC.IO.Comet MVC.IO.JsonP MVC.IO.WindowName MVC.IO.XDoc MVC.Model MVC.Model.Ajax MVC.Model.Cookie MVC.Model.JsonP MVC.Model.JsonRest MVC.Model.WindowName MVC.Model.XmlRest MVC.Native MVC.Native.Array MVC.Native.Date MVC.Native.Function MVC.Native.Number MVC.Native.Object MVC.Native.String MVC.Options MVC.Store MVC.SyntheticEvent MVC.Test MVC.Test.Assertions MVC.Test.Controller MVC.Test.Functional MVC.Test.Runner MVC.Test.Unit MVC.Timer MVC.Timer.Easings MVC.Vector MVC.View MVC.View.Helpers OpenAjax

MVC.Vector

A vector class
 new MVC.Vector(1,2)

Constructor

MVC.Vector

new MVC.Vector() -> mvc.vector

creates a new vector instance from the arguments. Example:

Prototype Methods

app

app(f) -> MVC.Vector
Applys the function to every item in the vector. Returns the new vector.
{Function} -
{MVC.Vector} - new vector class.

equals

equals() -> MVC.Vector
Returns the current vector if it is equal to the vector passed in. False if otherwise.
{MVC.Vector} -

left

left() -> Number
same as y()
{Number} -

minus

minus() -> MVC.Vector
Like plus but subtracts 2 vectors
{MVC.Vector} -

plus

plus() -> MVC.Vector
Adds two vectors together. Example:
 new Vector(1,2).plus(2,3) //-> <3,5>
 new Vector(3,5).plus(new Vector(4,5)) //-> <7,10>
{MVC.Vector} -

top

top() -> Number
Same as x()
{Number} -

toString

toString() -> String
returns (x,y)
{String} -

update

update(array) -> undefined
Replaces the vectors contents
{Object} -

x

x() -> Number
Returns the 2nd value of the vector
{Number} -

y

y() -> Number
Returns the first value of the vector
{Number} -