write the noise constants the C# divides as divisions
A define's body is walked and parenthesised now (sex#55). The four written as divisions fold to exactly the doubles they replace. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -7,16 +7,14 @@
|
||||
(pub include stdint.h)
|
||||
(include stdlib.h math.h)
|
||||
|
||||
;;; The C# folds these at compile time; written as divisions here they
|
||||
;;; would be unparenthesized macros and round differently in context.
|
||||
;; TODO sex#55: write the divisions, e.g. (/ -1.0 6.0), once define
|
||||
;; bodies are translated and parenthesized.
|
||||
;;; As the C# writes them. Its divisions are folded at compile time,
|
||||
;;; and C's are too, to the same doubles.
|
||||
(define STRETCH-2D -0.211324865405187)
|
||||
(define SQUISH-2D 0.366025403784439)
|
||||
(define STRETCH-3D -0.16666666666666666)
|
||||
(define SQUISH-3D 0.3333333333333333)
|
||||
(define NORM-2D 0.02127659574468085)
|
||||
(define NORM-3D 0.009708737864077669)
|
||||
(define STRETCH-3D (/ -1.0 6.0))
|
||||
(define SQUISH-3D (/ 1.0 3.0))
|
||||
(define NORM-2D (/ 1.0 47.0))
|
||||
(define NORM-3D (/ 1.0 103.0))
|
||||
(define NORM-2D-WARP 0.020435461373899677)
|
||||
(pub define MAX-VALUE-3D 0.9871465422297019)
|
||||
(define VALUE-MULTIPLIER 1.2)
|
||||
|
||||
Reference in New Issue
Block a user