MCPcopy Create free account
hub / github.com/AI-FanGe/OpenAIglasses_for_Navigation / scalePoint

Method scalePoint

static/visualizer.js:458–464  ·  view source on GitHub ↗
(point, width, height)

Source from the content-addressed store, hash-verified

456
457 // 辅助函数
458 scalePoint(point, width, height) {
459 if (!this.data.frame_size) return [0, 0];
460 return [
461 point[0] * width / this.data.frame_size.width,
462 point[1] * height / this.data.frame_size.height
463 ];
464 }
465
466 scalePoints(points, width, height) {
467 return points.map(p => this.scalePoint(p, width, height));

Callers 3

drawTrackModeMethod · 0.95
drawHandMethod · 0.95
scalePointsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected