1. 24 Mar, 2014 3 commits
    • Mike Bostock's avatar
      Prefer interpolateNumber when coercible to number. · 947c6090
      Mike Bostock authored
      Objects that are coercible to numbers, such as Dates, are often more usefully
      interpolated as numbers rather than as objects.
      947c6090
    • Mike Bostock's avatar
      Instead of bisectBy, replace bisector. · 90b6c0b9
      Mike Bostock authored
      For backwards-compatibility, bisector checks the arity of the specified
      function, and if the function only takes a single argument, it is wrapped with a
      suitable comparator.
      90b6c0b9
    • Mike Bostock's avatar
      Add d3.bisectBy(comparator). · 3c7cc81b
      Mike Bostock authored
      Fixes #1766. Unlike d3.bisector(accessor), this allows you to define a bisector
      that works in reverse order.
      
      An awkward aspect of implementing bisection on top of a comparator is that it is
      often the case that the sorted array contains objects (e.g., rows from a TSV),
      while the search value is a primitive value (e.g., a number). Thus, you want to
      apply an accessor to the array elements but not to the search value.
      
      The solution here is to invoke the comparator deterministically: the first
      argument is always an element from the array, and the second argument is always
      the search value. This lets a comparator apply an accessor to array elements but
      not to search values.
      3c7cc81b
  2. 23 Mar, 2014 1 commit
  3. 22 Mar, 2014 2 commits
  4. 21 Mar, 2014 1 commit
  5. 20 Mar, 2014 2 commits
  6. 17 Mar, 2014 2 commits
  7. 13 Mar, 2014 2 commits
  8. 09 Mar, 2014 1 commit
  9. 27 Feb, 2014 1 commit
  10. 26 Feb, 2014 1 commit
    • Jason Davies's avatar
      Workaround for lack of symmetry in Math.sin. · bef5de75
      Jason Davies authored
      Chrome 33 included some sin/cos optimisations, which unfortunately broke
      our assumption that sin(-x) + sin(x) = 0 for all x.  More details here:
      
        https://code.google.com/p/v8/issues/detail?id=3006
      
      This fix uses:
      
        sin(x) = sgn(x) * sin(abs(x))
      
      and:
      
        cos(x) = cos(abs(x))
      
      where it matters, which fixes area calculations for degenerate polygons
      such as:
      
        {"type":"Polygon",
         "coordinates":[[[-0.0002,0.0001],[0.0002,0.0001],[-0.0002,0.0001]]]}
      
      Fixes #1753.
      bef5de75
  11. 18 Feb, 2014 4 commits
  12. 11 Feb, 2014 2 commits
  13. 03 Feb, 2014 1 commit
  14. 21 Jan, 2014 1 commit
  15. 20 Jan, 2014 1 commit
  16. 16 Jan, 2014 1 commit
  17. 15 Jan, 2014 2 commits
  18. 14 Jan, 2014 2 commits
  19. 13 Jan, 2014 1 commit
  20. 10 Jan, 2014 3 commits
  21. 09 Jan, 2014 6 commits