[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r9761: libcore/matrix.cpp: document
From: |
Bastiaan Jacques |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r9761: libcore/matrix.cpp: document determinant() implementation. |
Date: |
Wed, 17 Sep 2008 11:30:25 +0200 |
User-agent: |
Bazaar (1.5) |
------------------------------------------------------------
revno: 9761
committer: Bastiaan Jacques <address@hidden>
branch nick: trunk
timestamp: Wed 2008-09-17 11:30:25 +0200
message:
libcore/matrix.cpp: document determinant() implementation.
libcore/vm/CallStack.h: allow vector as_value class visibility; fixes compile.
modified:
libcore/matrix.cpp
libcore/vm/CallStack.h
=== modified file 'libcore/matrix.cpp'
--- a/libcore/matrix.cpp 2008-08-26 12:26:38 +0000
+++ b/libcore/matrix.cpp 2008-09-17 09:30:25 +0000
@@ -327,6 +327,14 @@
matrix::determinant() const
// Return the 32.32 fixed point determinant of this matrix.
{
+ // | sx shy tx |
+ // | shx sy ty | = T. Using the Leibniz formula:
+ // | 0 0 1 |
+ //
+ // Det(T) = ( (sx * sy * 1 ) + (shy * ty * 0) + (tx * shx * 0) ) -
+ // ( (0 * sy * tx) + (0 * ty * sx) + (1 * shy * shx) )
+ // = sx * sy - shx * shy
+
return (boost::int64_t)sx * sy - (boost::int64_t)shx * shy;
}
=== modified file 'libcore/vm/CallStack.h'
--- a/libcore/vm/CallStack.h 2008-09-16 12:03:31 +0000
+++ b/libcore/vm/CallStack.h 2008-09-17 09:30:25 +0000
@@ -19,12 +19,12 @@
#define GNASH_VM_CALL_STACK_H
#include <vector>
+#include "as_value.h"
// Forward declarations
namespace gnash {
class as_object;
class as_function;
- class as_value;
}
namespace gnash {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/trunk r9761: libcore/matrix.cpp: document determinant() implementation.,
Bastiaan Jacques <=