初始化一个没有可选属性的结构
initialize a struct without the optionals properties
我希望能够创建此结构的对象而不必初始化 2 个可选的双精度数
enter image description here
您可以使用属性的默认值。
init(presentValue: Double, rate: Double, time: Double, frequency: Double = 0.0) {
...
}
我希望能够创建此结构的对象而不必初始化 2 个可选的双精度数 enter image description here
您可以使用属性的默认值。
init(presentValue: Double, rate: Double, time: Double, frequency: Double = 0.0) {
...
}