|
|
clipka <ano### [at] anonymousorg> wrote:
> Wait.
>
> What you're multiplying is YVal, not U.
> What you're debug-outputting is YVal rounded to 0 decimals, not YVal
> (nor U, for that matter).
Well what I'm comparing the loop integer to is max(0, U*Ustep) [see far below],
and it's crapping out right out of the gate.
element low high
_X = 0.00000, _Y = 0.00000
Testing Y = 0.000 vs <0.000, 0.000, 1.047> // totally skips this :(
Testing Y = 0.000 vs <1.000, 1.047, 2.094>
Testing Y = 0.000 vs <2.000, 2.094, 3.142>
Testing Y = 0.000 vs <3.000, 3.142, 4.189>
Testing Y = 0.000 vs <4.000, 4.189, 5.236>
Testing Y = 0.000 vs <5.000, 5.236, 6.283>
Testing Y = 0.000 vs <6.000, 6.283, 6.283>
My #debug output - those are macros - it's rounding to 3 decimals (see above),
the 0 is a flag for +/- "\n".
#declare Ustep = (U2-U1)/(UU);
#declare Vstep = (V2-V1)/(VV);
#debug concat ("UStep = U2 (", Scalar (U2, 5, 0), ") - U1 (", Scalar (U1, 5, 0),
") / Usize (", Scalar (Usize, 5, 0), ") = ", Scalar (Ustep, 5, 1))
#debug concat ("VStep = V2 (", Scalar (V2, 5, 0), ") - V1 (", Scalar (V1, 5, 0),
") / Vsize (", Scalar (Vsize, 5, 0), ") = ", Scalar (Vstep, 5, 1))
#debug "\n\n"
#for (U, 0, UU) // must be UU because SitchedArray is only that big
#declare UArray [U] = <U, max(0, U*Ustep), min((U+1)*Ustep, U2)>;
//#debug concat ("UArray [", Scalar (U, 0, 0), "] = ", Vector (UArray [U], 5,
1))
#end
#for (V, 0, VV) // must be VV because SitchedArray is only that big
#declare VArray [V] = <V, max(0, V*Vstep), min((V+1)*Vstep, V2)>;
//#debug concat ("VArray [", Scalar (V, 0, 0), "] = ", Vector (VArray [V], 5,
1))
#end
Post a reply to this message
|
|