Skip to content

Commit

Permalink
Switch from ** to Math.pow for getTooltipCoordinate (#1942)
Browse files Browse the repository at this point in the history
* change from ** to Math.pow

* change from ** to Math.pow

* fix: Add exponent for Math.pow()
  • Loading branch information
iRoachie committed Jul 6, 2019
1 parent 3224d9a commit be51a81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tooltip/getTooltipCoordinate.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const getArea = (a, b) => a * b;

const getPointDistance = (a, b) =>
Math.sqrt((a[0] - b[0]) ** 2 + (a[1] - b[1]) ** 2);
Math.sqrt(Math.pow(a[0] - b[0], 2) + Math.pow(a[1] - b[1], 2));

export const getElementVisibleWidth = (elementWidth, xOffset, ScreenWidth) => {
// Element is fully visible OR scrolled right
Expand Down

0 comments on commit be51a81

Please sign in to comment.