From 13844d10cc850b24f040c910fcef9beed88f71e9 Mon Sep 17 00:00:00 2001 From: Alfred Wong Date: Thu, 13 May 2021 20:19:06 +0100 Subject: [PATCH] Fix Source constructor (#186) Expose `Type{T}` to the other default arguments in the constructor Fixes #185 --- src/Optical/Emitters/Sources.jl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Optical/Emitters/Sources.jl b/src/Optical/Emitters/Sources.jl index 70db8a101..8666b4599 100644 --- a/src/Optical/Emitters/Sources.jl +++ b/src/Optical/Emitters/Sources.jl @@ -68,11 +68,11 @@ struct Source{ function Source( ::Type{T} = Float64; - transform::Tr = Transform(), - spectrum::S = Spectrum.Uniform(), - origins::O = Origins.Point(), - directions::D = Directions.Constant(), - power::P = AngularPower.Lambertian(), + transform::Tr = Transform(T), + spectrum::S = Spectrum.Uniform(T), + origins::O = Origins.Point(T), + directions::D = Directions.Constant(T), + power::P = AngularPower.Lambertian(T), sourcenum::Integer = 0 ) where { Tr<:Transform,