mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-23 15:17:09 +00:00
Handle catching unknowns
This commit is contained in:
@@ -67,3 +67,8 @@ export function lerp3(a: number, b: number, c: number, d: number, e: number, f:
|
||||
export function smoothstep(x: number): number {
|
||||
return x * x * x * (x * (x * 6 - 15) + 10)
|
||||
}
|
||||
|
||||
export function message(e: unknown): string {
|
||||
if (e instanceof Error) return e.message
|
||||
return `${e}`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user