Skip to content


Subversion checkout URL

You can clone with
Download ZIP
a port of Processing's PVector to CoffeeScript/JS
JavaScript CoffeeScript
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.

Port of Processing PVector to CoffeeScript

A class to describe a two or three dimensional vector. This datatype stores two
or three variables that are commonly used as a position, velocity, and/or
acceleration. Technically, position is a point and velocity and acceleration
are vectors, but this is often simplified to consider all three as vectors. For
example, if you consider a rectangle moving across the screen, at any given
instant it has a position (the object's location, expressed as a point.), a
velocity (the rate at which the object's position changes per time unit,
expressed as a vector), and acceleration (the rate at which the object's
velocity changes per time unit, expressed as a vector). Since vectors represent
groupings of values, we cannot simply use traditional
addition/multiplication/etc. Instead, we'll need to do some "vector" math,
which is made easy by the methods inside the PVector class. 
Something went wrong with that request. Please try again.