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 @@ -86,14 +86,14 @@ public func max(_ x: ${vectype}, _ y: ${vectype}) -> ${vectype} {
86
86
/// corresponding element of the input vector and the scalar.
87
87
@_transparent
88
88
public func min(_ vector: ${vectype}, _ scalar: ${scalar}) -> ${vectype} {
89
- return min(vector, ${vectype}(scalar))
89
+ return min(vector, ${vectype}(repeating: scalar))
90
90
}
91
91
92
92
/// Vector-scalar maximum. Each component of the result is the maximum of the
93
93
/// corresponding element of the input vector and the scalar.
94
94
@_transparent
95
95
public func max(_ vector: ${vectype}, _ scalar: ${scalar}) -> ${vectype} {
96
- return max(vector, ${vectype}(scalar))
96
+ return max(vector, ${vectype}(repeating: scalar))
97
97
}
98
98
99
99
/// Each component of the result is the corresponding element of `x` clamped to
@@ -370,7 +370,7 @@ extension ${mattype} {
370
370
371
371
/// Initialize matrix to have `scalar` on main diagonal, zeros elsewhere.
372
372
public init(_ scalar: ${type}) {
373
- self.init(diagonal: ${diagtype}(scalar))
373
+ self.init(diagonal: ${diagtype}(repeating: scalar))
374
374
}
375
375
376
376
/// Initialize matrix to have specified `diagonal`, and zeros elsewhere.
You can’t perform that action at this time.
0 commit comments