-
Notifications
You must be signed in to change notification settings - Fork 1
glossary
Martin Prout edited this page Sep 1, 2015
·
3 revisions
Processing provides degrees(val) and radians(val) as convenience methods, in ruby-processing Numeric has been extended to provide:-
-
val.degrees
(egPI.degrees
) -
val.radians
(eg80.radians
)
-
Vec2D.new(x, y)
( instead ofnew PVector(x,y)
if coming from processing ) -
vec.normalize
returns a normalized copy ofvec
-
vec.normalize!
returnsvec
which has been normalized - the
add
,subtract
,multiply
anddivide
operations of PVector are replaced by+
,-
,*
and/
load_library :hilbert
load_libraries :vbo, :control_panel
The load_library
and load_libraries
are synonyms, it just looks nicer to use the appropriate form. They allow for the easy loading both java
and ruby
libraries. Libraries can be in the core JrubyArt library folder or the sketchbook/libraries
folder (or similar for Mac), or in an adjacent library folder. You can load local files with require_relative
which might be better than using a local library in some cases. You should prefer to use symbol for library as above but string form eg 'vbo'
is also supported.