mirror of
https://github.com/gonum/gonum.git
synced 2025-10-12 18:40:09 +08:00
all: use cscalar.Same instead of local same function
This commit is contained in:
@@ -5,12 +5,13 @@
|
||||
package c64
|
||||
|
||||
import (
|
||||
"math/cmplx"
|
||||
"testing"
|
||||
|
||||
"gonum.org/v1/gonum/cmplxs/cscalar"
|
||||
)
|
||||
|
||||
func same(x, y complex64) bool {
|
||||
return x == y || (cmplx.IsNaN(complex128(x)) && cmplx.IsNaN(complex128(y)))
|
||||
return cscalar.Same(complex128(x), complex128(y))
|
||||
}
|
||||
|
||||
func guardVector(vec []complex64, gdVal complex64, gdLen int) (guarded []complex64) {
|
||||
|
Reference in New Issue
Block a user