2020-05-29 01:07:23 +02:00
|
|
|
// This is a module worker, so we can use imports (in the browser too!)
|
|
|
|
import pi from './utils/pi'
|
|
|
|
|
2022-09-23 23:08:30 +02:00
|
|
|
addEventListener('message', (event: MessageEvent<number>) => {
|
2020-05-29 01:07:23 +02:00
|
|
|
postMessage(pi(event.data))
|
|
|
|
})
|