Trigonometry Functions in QM stupomer Posting Freak Posts: 993 Threads: 326 Joined: Mar 2007 12-12-2011, 01:56 PM Hi Gintaras, I was wondering if Trigonometry functions (sine, cosign, tan, atn) were supported in QM. I see VB6 and updated .NET versions: http://msdn.microsoft.com/en-us/library/...s.80).aspx I don't see a lot of use of this for me in general but for one thing I am doing, I need to draw arrowheads on lines drawn with a mouse gesture (for horizontal and vertical "swipes", it's easy) but for any other oblique angle, I need a litle trig! I found this resource that basically tells me how to go about it but it needs the trig functions http://www.dbp-consulting.com/tutorials/...Arrow.html Unlike in the webpage, I am not interested necessarily in creating a general drawing function with specifiable arrowhead type/style etc., just appropriate simple line angles for my arrows reflecting the angle of the user's swipe. Thanks, S Reply Reply Gintaras Administrator Posts: 11,083 Threads: 129 Joined: Dec 2002 12-12-2011, 02:26 PM Some functions are in math category. Code: `a=math.cos(b)` Reference and other functions: http://msdn.microsoft.com/en-us/library ... 71%29.aspx Reply Reply stupomer Posting Freak Posts: 993 Threads: 326 Joined: Mar 2007 12-12-2011, 03:07 PM This is phenomenal. I was confused at first because I didn't realize that these functions needed the angle to be entered in radians. Once I realized that, I used the sample functions in the QM help "Math functions from C run-time library" from the degrees to radians conversion and now everything works great. for the conversion and now everything works great. Thanks so much!!! Stuart ps note the type "converst" --> "converts" for double s Quote:Example double angleDegrees=30 def PI 3.1415926535897932384626433832795 double s=sin(angleDegrees*PI/180) ;;converst degrees to radians and calculates sin double a=asin(s)*180/PI ;;calculates arcsin and converts radians to degrees out s out a Reply Reply « Next Oldest | Next Newest »