Add Photon type
This commit is contained in:
parent
8b30ad581e
commit
c6acac0567
|
|
@ -1,2 +1,5 @@
|
||||||
pub mod colour_rgb;
|
pub mod colour_rgb;
|
||||||
pub use colour_rgb::{ColourRgbF, ColourRgbU8, NamedColour};
|
pub use colour_rgb::{ColourRgbF, ColourRgbU8, NamedColour};
|
||||||
|
|
||||||
|
pub mod photon;
|
||||||
|
pub use photon::Photon;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
/// A quantum of light with a given wavelength and intensity
|
||||||
|
pub struct Photon {
|
||||||
|
/// The wavelength in nanometres
|
||||||
|
pub wavelength: f64,
|
||||||
|
/// The intensity of the light
|
||||||
|
///
|
||||||
|
/// Depending on context, this might represent actual intensity in W/sr,
|
||||||
|
/// radiant flux in W, irradiance in W/m^2, or radiance in W/(m^2sr).
|
||||||
|
pub intensity: f64,
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue