Skip to content

Commit

Permalink
Merge pull request #2 from ScottMacLachlan/scottmac/trig_identity
Browse files Browse the repository at this point in the history
Using trig identity for sinc2d
  • Loading branch information
ScottMacLachlan authored Oct 1, 2023
2 parents 23d2ca6 + 546af7c commit e9d6e07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/mymath.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def sinc2d(x,y):
elif y==0:
return m.sin(x)/x
else:
return (m.sin(x)/x)*(m.sin(y)/y)
return (m.cos(x-y) - m.cos(x+y))/(2*x*y)

def addone(x):
return x+1
Expand Down

0 comments on commit e9d6e07

Please sign in to comment.