venn.src.d.ts 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*!*
  2. *
  3. * Copyright (c) Highsoft AS. All rights reserved.
  4. *
  5. *!*/
  6. import * as globals from "../globals.src";
  7. import * as _Highcharts from "../highcharts.src";
  8. /**
  9. * Adds the module to the imported Highcharts namespace.
  10. *
  11. * @param highcharts
  12. * The imported Highcharts namespace to extend.
  13. */
  14. export function factory(highcharts: typeof Highcharts): void;
  15. declare module "../highcharts.src" {
  16. /**
  17. * Finds the root of a given function. The root is the input value needed
  18. * for a function to return 0.
  19. *
  20. * See https://en.wikipedia.org/wiki/Bisection_method#Algorithm
  21. *
  22. * TODO: Add unit tests.
  23. *
  24. * @param f
  25. * The function to find the root of.
  26. *
  27. * @param a
  28. * The lowest number in the search range.
  29. *
  30. * @param b
  31. * The highest number in the search range.
  32. *
  33. * @param tolerance
  34. * The allowed difference between the returned value and root.
  35. *
  36. * @param maxIterations
  37. * The maximum iterations allowed.
  38. *
  39. * @return Root number.
  40. */
  41. function bisect(f: Function, a: number, b: number, tolerance?: number, maxIterations?: number): number;
  42. }
  43. export default factory;
  44. export let Highcharts: typeof _Highcharts;