Collection of 2D Vector Operations.
(ns vector-ops
(:refer-clojure :exclude [+ - * =])
(:use (clojure.contrib.generic [arithmetic :only [+ - *]]
[comparison :only [=]]))
(:use [vector-2d.core] :reload-all))
(let [u (vector-2d 1 1)
v (vector-2d 2 2)]
(+ u v))
(let [guard-pos (vector-2d 1 3)
guard-facing (vector-2d 1 1)
hero-pos (vector-2d 3 2)]
(if (in-view-cone? guard-pos guard-facing 80 hero-pos)
"Guard Can See!!"
"Guard Can't See!!"))
Beerware Revision 42
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close