Description

The Hypotenuse Blueprint node currently returns a value of "-nan(ind)" if both values passed into the node are "0.0". This result is correct based on the code that the Hypotenuse node uses, but is not what is expected based on the Pythagorean Theorem. Based on the Pythagorean Theorem, the expected result would be "0.0" (ignoring that a "0.0" length should be impossible).

Steps to Reproduce
  1. Create a new Blank Blueprint project.
  2. Create an Actor Blueprint.
  3. Add a Hypotenuse node to the event graph.
  4. Leave both input values set to "0.0".
  5. Connect the output from the Hypotenuse node to a Vector * Float node.
  6. Set all three of the Vector values to 1.0.
  7. Connect the output from the Vector * Float node to the In String input of a Print String node.
  8. Set the Print String node to execute on Begin Play.
  9. Place an instance of the Actor Blueprint into the level.
  10. Start PIE.

RESULT:
The top left corner of the viewport shows all three values of the Vector as "-nan(ind)".

EXPECTED:
The top left corner of the viewport shows all three values of the Vector as "0.0".

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-69468 in the post.

1
Login to Vote

Fixed
ComponentUE - Gameplay - Blueprint
Affects Versions4.19.24.22
Target Fix4.22
Fix Commit4897429
Main Commit4897436
Release Commit4897429
CreatedFeb 1, 2019
ResolvedFeb 5, 2019
UpdatedFeb 8, 2019