Skip to content

Commit 3bf9c40

Browse files
committed
Change calculation of Chebyshev points of the second kind to be symmetric
1 parent 03c4548 commit 3bf9c40

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/chebyshevtransform.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,8 @@ function chebyshevpoints(::Type{T}, n::Integer; kind::Int=1) where T<:Number
294294
if n == 1
295295
zeros(T,1)
296296
else
297-
T[cospi(k/(n-one(T))) for k=0:n-1]
297+
m = n - 1
298+
T[sinpi(k/(T(2)*m)) for k=m:-2:-m]
298299
end
299300
else
300301
throw(ArgumentError("kind $kind not a valid kind of Chebyshev points"))

0 commit comments

Comments
 (0)