Calculates the reflection vector of two vectors.
// Returns (-0.2, 0.96) (reflection of (0.6, 0.8) across (0, 1))const reflected = Chalkboard.vect.reflect(Chalkboard.vect.init(0.6, 0.8), Chalkboard.vect.init(0, 1)); Copy
// Returns (-0.2, 0.96) (reflection of (0.6, 0.8) across (0, 1))const reflected = Chalkboard.vect.reflect(Chalkboard.vect.init(0.6, 0.8), Chalkboard.vect.init(0, 1));
The first vector (the incident vector)
The second vector (the normal vector)
Calculates the reflection vector of two vectors.
Example