Results 1 to 2 of 2

Thread: Degree

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2002
    Location
    Mumbai
    Posts
    9

    Cool Degree

    Hey!

    Can i move a line at an angle of 30, 40, 50,.... degree. Is there any method or procedure in vb which will help me do this. If so please let me know.

    thanz

    ----------------------------------------------------------------------------------

    Thanz! even if you don't help!

  2. #2
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    You can have the endpoint rotated around the start point. To do this, use the Cos() and Sin() (CoSine and Sine) functions. For the X variable, use NewEndX = Cos(Degree * (3.14 / 180)) * (EndX - StartX). For the Y, just use Y in place of X and change to Sin() instead of Cos().

    This is just a quick example, and you'll probably need to know more to make anything else with Cos and Sin.
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width