Retired

Lift/Drag ratio (retired)

Description
Loading description...
Fundamentals
  • Please sign in or sign up to leave a comment.
  • JohanWiltink Avatar

    If you want to tell solver their inputs, Test.it ( or just it ) is a much cleaner way then console.log.

    But for debugging, solver can just print inputs, and when a test fails, assertEquals will already tell you the actual and expected values.

    So there may not be much added value in printing them for every test.

  • JohanWiltink Avatar

    Please don't round ( or truncate ) floating point values. ( If you want the whole story, I could reproduce it, but it's been commented on other kata quite a few times already. )

    The much better solution is to compare with a margin for error, either absolute or relative. For relative comparisons, CodeWars has thoughtfully provided Test.assertApproxEquals.

    That pretty much pulls out the rug from under your kata, because the division thing is not really worth it. Sorry. ( Really. )

    There must be something more interesting to do with L/D; aerodynamics is quite the subject. :]