Skip to content
Snippets Groups Projects
Commit 19b552a7 authored by Udo Eisenbarth's avatar Udo Eisenbarth :speech_balloon:
Browse files

Change energy to f64

parent 204e98ff
No related branches found
No related tags found
No related merge requests found
......@@ -17,7 +17,7 @@ impl Display for LightData {
}
#[derive(Debug, PartialEq, Clone)]
pub struct LightDataEnergy {
pub energy: f32,
pub energy: f64,
}
#[derive(Debug, PartialEq, Clone)]
......
......@@ -13,22 +13,22 @@ type Result<T> = std::result::Result<T, OpossumError>;
#[derive(Debug)]
/// An ideal beamsplitter node with a given splitting ratio.
pub struct BeamSplitter {
ratio: f32,
ratio: f64,
}
impl BeamSplitter {
/// Creates a new [`BeamSplitter`] with a given splitting ratio.
pub fn new(ratio: f32) -> Self {
pub fn new(ratio: f64) -> Self {
Self { ratio }
}
/// Returns the splitting ratio of this [`BeamSplitter`].
pub fn ratio(&self) -> f32 {
pub fn ratio(&self) -> f64 {
self.ratio
}
/// Sets the splitting ratio of this [`BeamSplitter`].
pub fn set_ratio(&mut self, ratio: f32) {
pub fn set_ratio(&mut self, ratio: f64) {
self.ratio = ratio;
}
pub fn analyze_energy(&mut self, incoming_data: LightResult) -> Result<LightResult> {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment