From b1852abd2907452d07bdfcda67c5ef035927cf9f Mon Sep 17 00:00:00 2001 From: dooglus Date: Sun, 9 Mar 2008 12:07:19 +0000 Subject: [PATCH] Keep the value the same when converting to "Dot Product". git-svn-id: http://svn.voria.com/code@1903 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-core/trunk/src/synfig/valuenode_dotproduct.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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())); -- 2.7.4