MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / transitionPointAt

Function transitionPointAt

graph-ui/src/agents/agent-motion.ts:194–210  ·  view source on GitHub ↗
(
    from: MotionPoint,
    to: MotionPoint,
    control: MotionPoint,
    t: number,
)

Source from the content-addressed store, hash-verified

192
193/** Ein Punkt der Bahn, bei `t` zwischen 0 und 1. Quadratische Bezierkurve. */
194export function transitionPointAt(
195 from: MotionPoint,
196 to: MotionPoint,
197 control: MotionPoint,
198 t: number,
199): MotionPoint {
200 const e = t <= 0 ? 0 : t >= 1 ? 1 : t;
201 const inv = 1 - e;
202 const a = inv * inv;
203 const b = 2 * inv * e;
204 const c = e * e;
205 return {
206 x: a * from.x + b * control.x + c * to.x,
207 y: a * from.y + b * control.y + c * to.y,
208 z: a * from.z + b * control.z + c * to.z,
209 };
210}
211
212/**
213 * Der Abstand eines Punktes von der Geraden durch zwei andere, in der

Callers 2

AgentBodyFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected