Changing types for deltaFunction to double