reflect method

Vector3 reflect(
  1. Vector3 normal
)

Implementation

Vector3 reflect(Vector3 normal) {
  // reflect incident vector off plane orthogonal to normal
  // normal is assumed to have unit length

  return sub(_vector3.setFrom(normal).scale(2 * dot(normal)));
}