From: dooglus Date: Sun, 9 Mar 2008 12:07:19 +0000 (+0000) Subject: Keep the value the same when converting to "Dot Product". X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=b1852abd2907452d07bdfcda67c5ef035927cf9f;p=synfig.git Keep the value the same when converting to "Dot Product". git-svn-id: http://svn.voria.com/code@1903 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-core/trunk/src/synfig/valuenode_dotproduct.cpp b/synfig-core/trunk/src/synfig/valuenode_dotproduct.cpp index 20f8ae5..12a1c11 100644 --- a/synfig-core/trunk/src/synfig/valuenode_dotproduct.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_dotproduct.cpp @@ -56,12 +56,12 @@ ValueNode_DotProduct::ValueNode_DotProduct(const ValueBase &value): switch(value.get_type()) { case ValueBase::TYPE_REAL: - set_link("lhs",ValueNode_Const::create(Vector(1,0))); - set_link("rhs",ValueNode_Const::create(Vector(0,1))); + set_link("lhs",ValueNode_Const::create(Vector(value.get(Real()),0))); + set_link("rhs",ValueNode_Const::create(Vector(1,0))); break; case ValueBase::TYPE_ANGLE: - set_link("lhs",ValueNode_Const::create(Vector(1,0))); - set_link("rhs",ValueNode_Const::create(Vector(0,1))); + set_link("lhs",ValueNode_Const::create(Vector(Angle::cos(value.get(Angle())).get(), Angle::sin(value.get(Angle())).get()))); + set_link("rhs",ValueNode_Const::create(Vector(1,0))); break; default: throw Exception::BadType(ValueBase::type_local_name(value.get_type()));