Add math functions back to the prelude (#6595)

* Add math functions back to the prelude

* Update output

* Update docs
This commit is contained in:
Jonathan Tran
2025-04-30 11:07:05 -04:00
committed by GitHub
parent f1fdf48834
commit ccd5b0272d
111 changed files with 4002 additions and 4335 deletions

View File

@ -202,7 +202,7 @@ pub async fn pattern_transform_2d(exec_state: &mut ExecState, args: Args) -> Res
/// // Defines how to modify each layer of the vase.
/// // Each replica is shifted up the Z axis, and has a smoothly-varying radius
/// fn transform(replicaId) {
/// scale = r * math::abs(1 - (t * replicaId)) * (5 + math::cos((replicaId / 8): number(rad)))
/// scale = r * abs(1 - (t * replicaId)) * (5 + cos((replicaId / 8): number(rad)))
/// return {
/// translate = [0, 0, replicaId * 10],
/// scale = [scale, scale, 0],