Beta

Line, Normalization

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

    Needs random tests

    • wthit56 Avatar

      This would be pretty difficult for me to figure out. a) I haven't looked at this in a year. And b) it looks like something like this would just generally be difficult to do.

      Anyone interested in giving it a shot is welcome to do so, though. It's definitely a good feature to add.

  • Voile Avatar

    You didn't disable Math.hypot or even Math.pow. So what's the point in disabling Math.sqrt if Math.pow can do the same thing effortlessly too?

  • Voile Avatar

    You're comparing the values by their exact value, which are suspectible to floating point errors.

  • Voile Avatar

    Needs sample tests

    • wthit56 Avatar

      I've added a couple, though there's really too much going on in this kata to test much without just re-writing the entire "real" test suite.

      Issue marked resolved by wthit56 7 years ago
  • Freywar Avatar

    It seems to have no description of method .destroy. It can be deduced from maxPoolSize and new, but still... Also description of from and to parameters is slightly confusing, at least if you read the description from top to bottom. It says that they should be used to calculate rest of properties, but at this point no properties were mentioned yet. Just saying these are initial values for .from and .to should make it easier to understand.

    • wthit56 Avatar

      Good feedback! I've added a .destroy() explanation, and tried to clarify the .new(from, to) explanation. Looking at it all this time later, it seems I've just ordered things strangely. ;/

      Thanks again for your help!

      Issue marked resolved by wthit56 8 years ago
  • Uraza Avatar

    This comment has been hidden.

    • wthit56 Avatar

      Your Line.new() can return an object. And the pool can just be some variable somewhere that is referenced by Line.new(). Does that help?

    • Uraza Avatar

      I think it does help, I was just not sure if I was supposed to use a JS feature that I was not aware of or not. So, if I understand correctly, the allocation pool is either a global variable or a local variable in an IIFE. Thanks!

      Question marked resolved by Uraza 10 years ago
    • wthit56 Avatar

      No probs.