Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
_Hypot() Function
#2
Yep, correct. It's the same formula I use in my toolbox:

Code: (Select All)
FUNCTION VectorLength (V AS Type_Vector2)

    '            -->       _______________________
    ' Formula: || V || = \/ V.x * V.x + V.y * V.y

    VectorLength = _HYPOT(V.x, V.y)

END FUNCTION
New to QB64pe? Visit the QB64 tutorial to get started.
QB64 Tutorial
Reply


Messages In This Thread
_Hypot() Function - by bplus - 06-24-2023, 03:38 PM
RE: _Hypot() Function - by TerryRitchie - 06-24-2023, 04:32 PM
RE: _Hypot() Function - by OldMoses - 06-24-2023, 07:47 PM
RE: _Hypot() Function - by TerryRitchie - 06-24-2023, 10:13 PM
RE: _Hypot() Function - by bplus - 06-25-2023, 11:26 PM
RE: _Hypot() Function - by OldMoses - 06-25-2023, 11:29 PM
RE: _Hypot() Function - by bplus - 06-26-2023, 01:02 AM
RE: _Hypot() Function - by James D Jarvis - 07-13-2023, 05:09 PM



Users browsing this thread: 2 Guest(s)