API Reference > OdGe Classes > OdGeVector3d Class > OdGeVector3d Methods > angleTo Method > OdGeVector3d::angleTo Method (OdGeVector3d&, OdGeVector3d&)
OdGeVector3d::angleTo Method (OdGeVector3d&, OdGeVector3d&)
Syntax
C++
double angleTo(const OdGeVector3d& vect, const OdGeVector3d& refVector) const;
Parameters 
Description 
const OdGeVector3d& vect 
[in] Any 3D vector.  
const OdGeVector3d& refVector 
[in] Reference vector. 

angle to the specified vector in radians as a double value.

Returns the angle to the specified vector. 

 

  • Returns a value in the range [0.0 .. Oda2PI].
  • If (refVector.dotProduct(crossProduct(vect)) >= 0.0, the return value is angleTo(vect).
  • If (refVector.dotProduct(crossProduct(vect)) < 0.0, the return value is Oda2PI - angleTo(vect)

Copyright © 2002–2022. Open Design Alliance. All rights reserved.