Commit Graph

26 Commits

Author SHA1 Message Date
Matthias Richter
f6c5f621e7 Code cleanup 2015-10-12 08:21:16 +02:00
Matthias Richter
e8af2a6ec2 (Fix #33, #35) A more flexible definition of isvector(v)
Now returns true if `v' is a table and both `v.x' and `v.y' are numbers.
2014-08-22 13:47:55 +02:00
vrld
2abe666ce9 Merge pull request #32 from stfan/patch-1
Fix vector:trim_inplace()
2014-03-03 22:58:19 +01:00
stfan
65cef0e3dc Update vector.lua
Changed vector:trim_inplace so it actually trims the vector when it is longer than the maxLen
2014-03-03 20:28:40 +01:00
Mifuyne
157ec82cd5 ln 179 & 181: second self.y changed to self.x
For vector:angleTo()
2014-02-17 12:32:42 -05:00
Matthias Richter
32e0aaeaa6 Fix #25: vector:angleTo() returns wrong angle. 2013-11-04 22:04:16 +01:00
Matthias Richter
b3c329a1e8 Add vector.dist2(a,b). 2013-08-05 16:35:49 +02:00
Matthias Richter
1f9a7f1f52 Rename vector:angle(). Shorter implementation. Add vector.zero 2013-07-30 11:54:24 +02:00
out-of-pixel
4afcac5b36 add function angle()
returns the angle between a vector and the default rotation
2013-06-29 17:39:03 +02:00
Matthias Richter
e9b86ef2d5 Rename truncate to trim. Cleanup code. 2013-04-27 12:26:56 +02:00
Ricardo Zanini
ba8f724844 Added a truncate function to Vector Module. Based on this article: http://blog.signalsondisplay.com/?p=336 2013-04-25 23:07:57 -03:00
Matthias Richter
8d4e5bb65f Update license header 2013-02-20 16:54:57 +01:00
Matthias Richter
7f92f2c4f1 brief(er) vector factory 2012-06-12 12:58:33 +02:00
Matthias Richter
4f03a71f59 Code cleanup 2012-05-19 01:34:56 +02:00
a_m0d
1c683f50a4 Fix divide-by-zero error in vector:normalize()
and vector:normalize_in_place()
2012-04-18 22:57:47 -04:00
Matthias Richter
adcceed73b Update license header 2012-04-10 17:00:02 +02:00
Matthias Richter
3957c73548 Fix wrong variable name in vector:mirrorOn() (thanks, Dani Ka!) 2012-02-17 21:12:41 +01:00
Matthias Richter
1bdeb7ef4a Avoid unnecessary creation of vector objects 2012-01-21 23:35:31 +01:00
Matthias Richter
28b698fb00 Eliminate use of module(...) function 2011-07-06 14:19:31 +02:00
Matthias Richter
d1d6dbb056 Make proper modules 2011-01-18 17:44:38 +01:00
Matthias Richter
72b06e2387 Fix vector cross product 2011-01-06 23:24:27 +01:00
Matthias Richter
770fe5234b Add cross product 2010-09-30 11:46:33 +02:00
Matthias Richter
0ab3a6898c Fix issue #1: Typo in assert 2010-09-30 11:44:31 +02:00
Matthias Richter
8311ddbad1 Add license header 2010-09-19 15:37:55 +02:00
Matthias Richter
66c0f92a30 Add projection and perpendicular 2010-08-17 13:17:01 +02:00
Matthias Richter
f491a92eaa Initial commit 2010-08-09 17:52:48 +02:00