Jump to content

[Resolved]Reversing Angle Directions


Recommended Posts

Okay that works for the left wall. but what about the right? Heres what 45 and 315 look like to autoit(see attachments)

Ok, looks like the problem WAS with your angle function!

Just a bit of a math mix-up - no big problem

your angle function should look like this:

Func Angle($x1, $y1 ,$angle, $length)
    Local $return[2]
    $return[0] = $x1 + ($length * Sin($angle * 3.14159 / 180))
    $return[1] = $y1 - ($length * Cos($angle * 3.14159 / 180))
    Return $return
EndFunc

Let us know if this works!

- Table UDF - create simple data tables - Line Graph UDF GDI+ - quickly create simple line graphs with x and y axes (uses GDI+ with double buffer) - Line Graph UDF - quickly create simple line graphs with x and y axes (uses AI native graphic control) - Barcode Generator Code 128 B C - Create the 1/0 code for barcodes. - WebCam as BarCode Reader - use your webcam to read barcodes - Stereograms!!! - make your own stereograms in AutoIT - Ziggurat Gaussian Distribution RNG - generate random numbers based on normal/gaussian distribution - Box-Muller Gaussian Distribution RNG - generate random numbers based on normal/gaussian distribution - Elastic Radio Buttons - faux-gravity effects in AutoIT (from javascript)- Morse Code Generator - Generate morse code by tapping your spacebar!
Link to comment
Share on other sites

Ok, looks like the problem WAS with your angle function!

Just a bit of a math mix-up - no big problem

your angle function should look like this:

Func Angle($x1, $y1 ,$angle, $length)
    Local $return[2]
    $return[0] = $x1 + ($length * Sin($angle * 3.14159 / 180))
    $return[1] = $y1 - ($length * Cos($angle * 3.14159 / 180))
    Return $return
EndFunc

Let us know if this works!

Thank you. you are awsome!
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...