Skip to content
This repository has been archived by the owner on Jan 15, 2022. It is now read-only.

Tutorial 4 Should Reference ifCond. #1

Open
joshpoll opened this issue Jun 4, 2021 · 0 comments
Open

Tutorial 4 Should Reference ifCond. #1

joshpoll opened this issue Jun 4, 2021 · 0 comments

Comments

@joshpoll
Copy link

joshpoll commented Jun 4, 2021

Tutorial 4 currently says that if statements are not allowed in constraint definitions. While it is true that JS if statements are not allowed, it seems that Autodiff.ts does have an ifCond function that can be used to construct a constraint with a conditional: https://github.com/penrose/penrose/blob/dbf710646bcaad9f0e3142388ae4759ca6b3a740/packages/core/src/engine/Autodiff.ts#L798

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant