Hello,I define a vextor via two points(ptStart and ptDirection).And now I want to get the angle between my vector3d and the X Axis.Here is my code:
Dim Ang As Double = ptStart.GetVectorTo(ptDirection).GetAngleTo(Vector
But the range is 0-PI.How can I change it to 0-2PI?
I see there is another version of this method:
Returns the angle between this vector and the vector vector in the range [0, 2 x Pi].
Please, find its description in the Managed Class Reference Guide (\ObjectARX 2012\docs\arxmgd.chm).
Hi! Try this.
double Ang = ptStart.GetVectorTo(ptDirection).GetAngleTo(Vector
although i do not want to spoil the party, i desperately fail to obtain any angles above the 0-pi interval. i admit i still use autocad 2011, however, the documentation for the .getangleto(vec; vecref) appears as you state.
considering the problem, i could do myself with some clarification as to how it's supposed to work:
starting with a vector3d, i look for the angle to another vector3d. to keep things simple, let's say they both originate in the same point and 'point away' from it in separate directions. why is there an optional reference-vector3d? if it's only to expand the interval from 0-pi to 0-2*pi, then an optional boolean would have been satisfactory.
many thanks, felix
yes of course, as soon as i posted it...
to whom it may concern
the additional vecref can be used to define [or fixate] that one dimension of the three (in 3d) that leaves the other two to span the plane in which the angle is measured. in turn it means that the option without the vecref leaves it completely to the two original vectors, i.e. the calling one and the parameter one, to define a plane and the angle within, which also explains why then with the information given it is not possible to give angles above pi, because 'they technically then do not exist'.
hope you enjoyed the show
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register
Start with some of our most frequented solutions to get help installing your software.