Next.js website for Rocky Mountain Vending company featuring: - Product catalog with Stripe integration - Service areas and parts pages - Admin dashboard with Clerk authentication - SEO optimized pages with JSON-LD structured data Co-authored-by: Cursor <cursoragent@cursor.com>
18 lines
535 B
Text
18 lines
535 B
Text
import {tickIncrement} from "./ticks.js";
|
|
|
|
export default function nice(start, stop, count) {
|
|
let prestep;
|
|
while (true) {
|
|
const step = tickIncrement(start, stop, count);
|
|
if (step === prestep || step === 0 || !isFinite(step)) {
|
|
return [start, stop];
|
|
} else if (step > 0) {
|
|
start = Math.floor(start / step) * step;
|
|
stop = Math.ceil(stop / step) * step;
|
|
} else if (step < 0) {
|
|
start = Math.ceil(start * step) / step;
|
|
stop = Math.floor(stop * step) / step;
|
|
}
|
|
prestep = step;
|
|
}
|
|
}
|