🪖 Moves lerp to math utilities

This commit is contained in:
Rune Harlyk
2024-02-22 23:50:10 +01:00
parent 5c95deae49
commit edbe907fa7
4 changed files with 5 additions and 5 deletions
+1
View File
@@ -1,2 +1,3 @@
export * from './result'
export * from './string-utilities'
export * from './math-utilities'
+3
View File
@@ -0,0 +1,3 @@
export const lerp = (start: number, end: number, amt: number) => {
return (1 - amt) * start + amt * end;
};
-4
View File
@@ -1,9 +1,5 @@
import { writable } from 'svelte/store';
export const lerp = (start: number, end: number, amt: number) => {
return (1 - amt) * start + amt * end;
};
export const persistentStore = (key:string, initialValue:any) => {
const savedValue = JSON.parse(localStorage.getItem(key) as string);
const data = savedValue !== null ? savedValue : initialValue;