1.9
This commit is contained in:
parent
fc7c94bd69
commit
2cc2f003df
71 changed files with 3359 additions and 1027 deletions
|
|
@ -4,14 +4,11 @@
|
|||
// Shared primitive geometry helpers used by placement, collision, mechanical bodies,
|
||||
// editor hit-testing, and world obstacle queries.
|
||||
(function (global) {
|
||||
function num(v, fallback = 0) {
|
||||
const num = global.TarinaiCoreHelpers?.finiteOr || ((v, fallback = 0) => {
|
||||
const n = Number(v);
|
||||
return Number.isFinite(n) ? n : fallback;
|
||||
}
|
||||
|
||||
function clampValue(v, min, max) {
|
||||
return Math.max(min, Math.min(max, v));
|
||||
}
|
||||
});
|
||||
const clampValue = global.TarinaiCoreHelpers?.clampNumber || ((v, min, max) => Math.max(min, Math.min(max, v)));
|
||||
|
||||
function orientedRectAabb(cx, cy, halfW, halfH, angle) {
|
||||
const c = Math.cos(num(angle));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue