23KisVector2D& KisVector2D::normalize()
25 double length, ilength;
27 length = m_x*m_x + m_y*m_y;
28 length = sqrt (length);
39KisVector3D& KisVector3D::normalize()
41 double length, ilength;
43 length = m_x*m_x + m_y*m_y + m_z*m_z;
44 length = sqrt (length);
56KisVector3D& KisVector3D::crossProduct( const KisVector3D &v)
60 x = m_y*v.m_z - m_z*v.m_y;
61 y = m_z*v.m_x - m_x*v.m_z;
62 z = m_x*v.m_y - m_y*v.m_x;
|