pub fn grating_equation_kernel(
pitch: Length,
order: i32,
incidence: RayAngle,
wavelength: Wavelength,
) -> Result<RayAngle, PhysicsError>Expand description
Calculates the diffraction angle for a Grating using the Grating Equation.
$$ d (\sin \theta_m - \sin \theta_i) = m \lambda $$
Solves for $\theta_m$.
§Arguments
pitch- Grating pitch $d$ (distance between grooves).order- Diffraction order $m$ (integer).incidence- Angle of incidence $\theta_i$.wavelength- Wavelength $\lambda$.
§Returns
Result<RayAngle, PhysicsError>- Diffraction angle $\theta_m$.