#### Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

# VB6: sin, tan, cos...

Member Posts: 44
I need help wt trigonometric functions.
Say I want to know how far a character must move in X & Y terms
if they're faced a certain angle. (ie. if the char is 40*, how
far will it go in X & Y if it travels 200)

I also need 2 know about how 2 retrieve angles.
ie. At what angle an enemy is from a character.
I tried sin, tan, cos but I can't figure them out.

Thanks.
[red]Dragon[/red][purple]storM[/purple]

• Member Posts: 420
: I need help wt trigonometric functions.
: Say I want to know how far a character must move in X & Y terms
: if they're faced a certain angle. (ie. if the char is 40*, how
: far will it go in X & Y if it travels 200)
:
: I also need 2 know about how 2 retrieve angles.
: ie. At what angle an enemy is from a character.
: I tried sin, tan, cos but I can't figure them out.
:
: Thanks.
: [red]Dragon[/red][purple]storM[/purple]
:
:
If memory serves, the problem with VB is that the only inverse function is arctangent (atn)
The angle would be atn(deltaX/deltaY) in radians, multiply by 180/pi for degrees

• Member Posts: 44
Thanks!

[red]Dragon[/red][purple]storM[/purple]

• Member Posts: 0

|| http://forcoder.org || free video tutorials and ebooks about \ PL/SQL, Scratch, Go, Visual Basic, Java, Ruby, Perl, R, MATLAB, Visual Basic .NET, C++, Python, PHP, Assembly, C, C#, Objective-C, Delphi, JavaScript, Swift Awk, F#, Logo, Julia, Lisp, ML, Crystal, COBOL, D, Bash, Scala, Apex, Rust, Transact-SQL, VBScript, Ada, Hack, Scheme, ABAP, Clojure, Erlang, Prolog, SAS, FoxPro, Fortran, Alice, Lua, LabVIEW, Kotlin, Dart \ ____