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>
29 lines
700 B
Text
29 lines
700 B
Text
import constant from "./constant.js";
|
|
|
|
function linear(a, d) {
|
|
return function(t) {
|
|
return a + t * d;
|
|
};
|
|
}
|
|
|
|
function exponential(a, b, y) {
|
|
return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) {
|
|
return Math.pow(a + t * b, y);
|
|
};
|
|
}
|
|
|
|
export function hue(a, b) {
|
|
var d = b - a;
|
|
return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : constant(isNaN(a) ? b : a);
|
|
}
|
|
|
|
export function gamma(y) {
|
|
return (y = +y) === 1 ? nogamma : function(a, b) {
|
|
return b - a ? exponential(a, b, y) : constant(isNaN(a) ? b : a);
|
|
};
|
|
}
|
|
|
|
export default function nogamma(a, b) {
|
|
var d = b - a;
|
|
return d ? linear(a, d) : constant(isNaN(a) ? b : a);
|
|
}
|