Skip to content

Commit

Permalink
Format prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
carbonrobot committed Jan 31, 2024
1 parent 05423c2 commit 649dd84
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/victory-core/src/victory-util/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,10 @@ export function getCurrentAxis(axis, horizontal) {

/**
* Creates an array of numbers (positive and/or negative) progressing
* from start up to, but not including, end.
* from start up to, but not including, end.
* A step of -1 is used if a negative start is specified without an end or step.
* If end is not specified, it's set to start with start then set to 0.
*
*
* @param start The length of the array to create, or the start value
* @param end [The end value] If this is defined, start is the start value
* @returns An array of the given length
Expand All @@ -237,10 +237,10 @@ export function range(start: number, end?: number, increment?: number) {
// ensure endIndex is not a falsy value
if (!endIndex) endIndex = 0;

const k = endIndex - startIndex; // the value range
const length = Math.abs(k); // the length of the range
const sign = k / length || 1; // the sign of the range (negative or positive)
const inc = increment || 1; // the step size of each increment
const k = endIndex - startIndex; // the value range
const length = Math.abs(k); // the length of the range
const sign = k / length || 1; // the sign of the range (negative or positive)
const inc = increment || 1; // the step size of each increment

// normalize the array length when dealing with floating point values
const arrayLength = Math.max(Math.ceil(length / inc), 0);
Expand Down

0 comments on commit 649dd84

Please sign in to comment.