Commit Graph

6 Commits

Author SHA1 Message Date
05683f8e52 edits to argument parsing for Euler.rotate_axis, also corrected some exception messages and minor style edits. 2011-09-19 15:13:16 +00:00
0f5d3a3ddb add back mathutils Matrix() * Vector(), this is row_vector multiplication.
some minor changes to exception messages.
2011-09-19 14:29:21 +00:00
e98074d327 remove support for deprecated Vector() * Matrix(), eventually this will be added back as row_vector_multiplication bu to avoid confusion for a bit just disable it altogether so script authors get an error on use and update their scripts. 2011-08-16 13:10:46 +00:00
165e6dbc07 Adding a readonly length_squared property to mathutils.Vector. This is simply vector.dot(vector), so nothing new is really added, but it's nice for writing more intent revealing code. In other words:
if vec.dot(vec) > some_distance*some_distance:
    do_something()

might not be quite as obvious looking as:

if vec.length_squared > some_distance*some_distance:
    do_something()

As to why you'd want to use length_squared over length is that length uses a square root, which isn't always necessary for simple distance checks (e.g., closest object, checks like the ones above, ect).
2011-08-11 09:40:14 +00:00
ced8f1dffc deprecate multiplication orders:
vector * matrix
 vector *= matrix
 vector * quaternion
 vector *= quaternion 

Use the reverse order instead, enable WITH_ASSERT_ABORT in cmake to promote the warnings into errors.
2011-07-25 01:44:19 +00:00
3a6158a8bf move mathutils into its own lib. 2011-07-15 04:01:47 +00:00