Reflects the given vector on the given surface.

Type signature

(a: [number, number], v: [number, number]) => [number, number]

Examples

reflect([1, -2], [1, 0]);
// ⇒ [0.6, 0.8]
Try in REPL

Questions

  • How to reflect a vector on another vector?

TypeScript sourceJavaScript source