-2

I want to be able to create an object of this struct without having to initialize the 2 optional doubles enter image description here

Omar d
  • 35
  • 3

1 Answers1

0

you can use default value for the properties.

init(presentValue: Double, rate: Double, time: Double, frequency: Double = 0.0) {
...
}
Oscar Cardona
  • 46
  • 1
  • 5