MCPcopy Create free account
hub / github.com/R44VC0RP/teslanav.com / getAngleDiff

Function getAngleDiff

components/Map.tsx:151–154  ·  view source on GitHub ↗
(from: number, to: number)

Source from the content-addressed store, hash-verified

149
150// Get shortest angle difference for smooth rotation
151function getAngleDiff(from: number, to: number): number {
152 const diff = normalizeAngle(to - from);
153 return diff > 180 ? diff - 360 : diff;
154}
155
156// Calculate night overlay opacity based on time of day (0 = no overlay, 1 = full dark)
157// Uses a smooth curve: darkest at midnight, brightest at noon

Callers 1

Map.tsxFile · 0.85

Calls 1

normalizeAngleFunction · 0.85

Tested by

no test coverage detected