Rocky_Mountain_Vending/.pnpm-store/v10/files/1b/91e3b8f6d259945ecdef1aabcf29e3aefb42c79d7de926bd3ca23a1ea8c6a8b5847a3723c9b751d1ba2e1338dd148c4a08e7614ec0152ff543945de11cf33f
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
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>
2026-02-12 16:22:15 -07:00

50 lines
1.2 KiB
Text

import {linearish} from "./linear.js";
import {copy, identity, transformer} from "./continuous.js";
import {initRange} from "./init.js";
function transformPow(exponent) {
return function(x) {
return x < 0 ? -Math.pow(-x, exponent) : Math.pow(x, exponent);
};
}
function transformSqrt(x) {
return x < 0 ? -Math.sqrt(-x) : Math.sqrt(x);
}
function transformSquare(x) {
return x < 0 ? -x * x : x * x;
}
export function powish(transform) {
var scale = transform(identity, identity),
exponent = 1;
function rescale() {
return exponent === 1 ? transform(identity, identity)
: exponent === 0.5 ? transform(transformSqrt, transformSquare)
: transform(transformPow(exponent), transformPow(1 / exponent));
}
scale.exponent = function(_) {
return arguments.length ? (exponent = +_, rescale()) : exponent;
};
return linearish(scale);
}
export default function pow() {
var scale = powish(transformer());
scale.copy = function() {
return copy(scale, pow()).exponent(scale.exponent());
};
initRange.apply(scale, arguments);
return scale;
}
export function sqrt() {
return pow.apply(null, arguments).exponent(0.5);
}