File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
stdlib/public/Darwin/simd Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -90,14 +90,14 @@ public func max(_ x: ${vectype}, _ y: ${vectype}) -> ${vectype} {
90
90
/// corresponding element of the input vector and the scalar.
91
91
@_transparent
92
92
public func min(_ vector: ${vectype}, _ scalar: ${scalar}) -> ${vectype} {
93
- return min(vector, ${vectype}(scalar))
93
+ return min(vector, ${vectype}(repeating: scalar))
94
94
}
95
95
96
96
/// Vector-scalar maximum. Each component of the result is the maximum of the
97
97
/// corresponding element of the input vector and the scalar.
98
98
@_transparent
99
99
public func max(_ vector: ${vectype}, _ scalar: ${scalar}) -> ${vectype} {
100
- return max(vector, ${vectype}(scalar))
100
+ return max(vector, ${vectype}(repeating: scalar))
101
101
}
102
102
103
103
/// Each component of the result is the corresponding element of `x` clamped to
@@ -374,7 +374,7 @@ extension ${mattype} {
374
374
375
375
/// Initialize matrix to have `scalar` on main diagonal, zeros elsewhere.
376
376
public init(_ scalar: ${type}) {
377
- self.init(diagonal: ${diagtype}(scalar))
377
+ self.init(diagonal: ${diagtype}(repeating: scalar))
378
378
}
379
379
380
380
/// Initialize matrix to have specified `diagonal`, and zeros elsewhere.
You can’t perform that action at this time.
0 commit comments