Working but slow
This commit is contained in:
@@ -72,6 +72,12 @@ export function seededRandom(seed: string) {
|
||||
}
|
||||
}
|
||||
|
||||
export function resolveRngSeed(simulation: JsonObject | undefined, fallback: string) {
|
||||
if (typeof simulation?.rng_seed === 'string' && simulation.rng_seed.trim()) return simulation.rng_seed
|
||||
if (typeof simulation?.seed === 'string' && simulation.seed.trim()) return simulation.seed
|
||||
return fallback
|
||||
}
|
||||
|
||||
export function isBoundaryCondition(value: unknown): value is BoundaryCondition {
|
||||
return value === 'wrap' || value === 'mirror' || value === 'fixed'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user