filepond
Version:
FilePond, where files go to stretch their bits.
63 lines (62 loc) • 1.15 kB
JavaScript
/*!
* FilePond v5.0.2
* Copyright (c) 2017-2026 Pqina B.V.
* Released under the MIT License
* https://filepond.com
*/
import { elastify as c } from "./math.js";
const i = o();
function o(t = 0, r = 0) {
return {
x: t,
y: r
};
}
function f(t) {
return o(t.x, t.y);
}
function u(t, r) {
const n = t.x - r.x, e = t.y - r.y;
return n * n + e * e;
}
function v(t) {
return u(t, o());
}
function s(t, r) {
return o(t.x + r.x, t.y + r.y);
}
function d(t, r) {
return o(t.x - r.x, t.y - r.y);
}
function l(t, r) {
return t.x === r.x && t.y === r.y;
}
function y(t, r) {
return t.x * r.x + t.y * r.y;
}
function m(t, r, n) {
return y(t, {
x: n.x - r.x,
y: n.y - r.y
}) > 0;
}
function q(t) {
return o(-t.x, -t.y);
}
function I(t, r, n) {
return !r || !n ? { ...t } : o(t.x + c(r.x - t.x, n), t.y + c(r.y - t.y, n));
}
export {
i as ORIGIN,
m as isVectorPointingTowardsPoint,
s as vectorAdd,
o as vectorCreate,
u as vectorDistanceSquared,
y as vectorDotProduct,
I as vectorElastify,
l as vectorEqual,
f as vectorFromRect,
q as vectorInvert,
v as vectorLengthSquared,
d as vectorSubtract
};