Skip to content

Commit

Permalink
Up distsance range (#154)
Browse files Browse the repository at this point in the history
  • Loading branch information
mfikes authored Jan 14, 2024
1 parent 8bce648 commit 60c6122
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ struct WavelengthView: View {
@ObservedObject var viewModel: ViewModel

var body: some View {
UnitInputView(value: $viewModel.wavelength, unit: LengthUnit.m, label: "λ", description: "wavelength")
UnitInputView(value: $viewModel.wavelength, unit: WavelengthUnit.m, label: "λ", description: "wavelength")
}
}

Expand Down
6 changes: 6 additions & 0 deletions Impedance Converter/Impedance Converter/Units.swift
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@ enum LengthUnit: String, UnitWithPowerOfTen {
var basePower: Int { -9 }
}

enum WavelengthUnit: String, UnitWithPowerOfTen {
case µm, mm, m, km
var id: Self { self }
var basePower: Int { -6 }
}

enum VelocityFactorUnit: String, UnitWithPowerOfTen {
case V
var id: Self { self }
Expand Down

0 comments on commit 60c6122

Please # to comment.