Skip to content

Commit

Permalink
feat(stdlib): perspective constancy function (#288)
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzogentile404 authored Nov 3, 2024
1 parent 4f3723a commit 2a9a1d1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/stdlib.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@
(if-not-zero ct
(remained-constant! X)))

;; perspective constancy constraint
(defpurefun ((perspective-constancy :@loob) PERSPECTIVE_SELECTOR X)
(if-not-zero (* PERSPECTIVE_SELECTOR (prev PERSPECTIVE_SELECTOR))
(remained-constant! X)))

;; base-X decomposition constraints
(defpurefun (base-X-decomposition ct base acc digits)
(if-zero ct
Expand Down

0 comments on commit 2a9a1d1

Please sign in to comment.