• Sign Up
    Time to claim your honor
  • Training
  • Practice
    Complete challenging Kata to earn honor and ranks. Re-train to hone technique
  • Freestyle Sparring
    Take turns remixing and refactoring others code through Kumite
  • Community
  • Leaderboards
    Achieve honor and move up the global leaderboards
  • Chat
    Join our Discord server and chat with your fellow code warriors
  • Discussions
    View our Github Discussions board to discuss general Codewars topics
  • About
  • Docs
    Learn about all of the different aspects of Codewars
  • Blog
    Read the latest news from Codewars and the community
  • Log In
  • Sign Up
wasilak Avatar
Name:Piotr Boruc
Clan:Unknown
Member Since:Jan 2015
Last Seen:Sep 2021
Profiles:
Following:0
Followers:0
Allies:0
View Profile Badges
  • Stats
  • Kata
  • Collections
  • Kumite
  • Social
  • Discourse
  • Conversations (21)
  • Replies
  • Authored
  • Needs Resolution
  • Custom User Avatar
    • danik00111
    • commented on "Line Segments Intersection Point" kata
    • 13 months ago

    wait, i think there exists a thingy like "assert similar", right?

  • Custom User Avatar
    • danik00111
    • commented on "Line Segments Intersection Point" kata
    • 13 months ago

    I think he meant parallel lines.

  • Custom User Avatar
    • Chrono79
    • commented on "Line Segments Intersection Point" kata
    • 15 months ago

    Change the description to say that false should be returned for parralel lines.

    Why should that be mentioned? That's their definition:

    Parallel lines

    Two or more lines that lie in the same plane and never intersect each other are known as parallel lines.

    Also, what if segments don't intersect, but their extensions do?

    Aren't we talking here about intersection of segments? If they don't intersect, then they don't. So your previous suggestion isn't valid either and the current description is fine.

  • Custom User Avatar
    • danik00111
    • commented on "Line Segments Intersection Point" kata
    • 15 months ago

    Change the description to say that false should be returned for parralel lines.

    Also, what if segments don't intersect, but their extensions do?

  • Custom User Avatar
    • Voile
    • created an issue for "Line Segments Intersection Point" kata
    • 2 years ago

    Floating point error:

    Expected: '[\'8938.57393995\', \'2759412.26715096\']', instead got: '[\'8938.57393995\', \'2759412.26715097\']'
    
  • Custom User Avatar
    • Voile
    • created an issue for "Line Segments Intersection Point" kata
    • 2 years ago

    This kata is a close duplicate of https://www.codewars.com/kata/63a5b74a9803f2105fa838f1, which has become approvable.

    Considering this kata has too many issues and written poorly, probably that kata should be approved instead.

  • Custom User Avatar
    • user9644768
    • created an issue for "Line Segments Intersection Point" kata
    • 5 years ago

    No sample and random tests.

  • Custom User Avatar
    • chessmonger2112
    • commented on "Line Segments Intersection Point" kata
    • 9 years ago

    Would be nice if in the description it mentioned if there is no intersection between segments to return false.

    Otherwise great kata!

  • Custom User Avatar
    • wthit56
    • resolved an issue on "Line Segments Intersection Point" kata
    • 11 years ago

    Awesome. Thanks for your help!

  • Custom User Avatar
    • wasilak
    • commented on "Line Segments Intersection Point" kata
    • 11 years ago

    I fixed it according to your suggestion using n.toFixed(8). Should be safer now in case of faulty rounded floats :)

  • Custom User Avatar
    • wthit56
    • commented on "Line Segments Intersection Point" kata
    • 11 years ago

    Yeah, that's totally fine. It's just that if someone does the same mathematical operations in a different order, the float could come out being a tiny bit different. Floats tend to have a degree of error when dealing with floats or very large numbers. One way of fixing this would be to test n.toFixed(8) instead of the actual numbers themselves.

  • Custom User Avatar
    • wasilak
    • commented on "Line Segments Intersection Point" kata
    • 11 years ago

    good point, sorry :)

  • Custom User Avatar
    • ZozoFouchtra
    • commented on "Line Segments Intersection Point" kata
    • 11 years ago

    As @wthit56 has not yet solved the kata if you mark your reply as "spoiler" he (@wthit) can't read it.
    :)

  • Custom User Avatar
    • wasilak
    • commented on "Line Segments Intersection Point" kata
    • 11 years ago

    Could you please be more clear? I'm not that good in English nor programming. Do you mean that I should set kata requirement, i.e. Float(0,2) and then check it with same tollerance in tests? Or just in tests?

    For now I was assuming, that points like [1.5517241379310345,0.9655172413793105] are valid answers.

  • Custom User Avatar
    • wthit56
    • created an issue for "Line Segments Intersection Point" kata
    • 11 years ago

    I think you need some float tolerances added to your tests. I seem to be getting the right numbers within 8 decimal places...

  • Loading more items...
  • © 2025 Codewars
  • About
  • API
  • Blog
  • Privacy
  • Terms
  • Code of Conduct
  • Contact

Confirm

  • Cancel
  • Confirm

Collect: undefined

Loading collection data...