|
|
Am 07.01.2019 um 12:53 schrieb jr:
>> The magnitude of the `polarity` paramezer is irrelevant, only the sign
>> matters (or, more precisely, whether the parameter is positive; zero has
>> the same effect as a negative value).
>
> so why is the parameter a float, when (just) a boolean would seem to be a better
> fit? future expansion?
No; I just think the parameter should be `polarity SIGN` rather than
`positive_polarity BOOL`; but POV-Ray doesn't have a `SIGN` type, so I
went for the next best thing, which is the sign of a `FLOAT`. So in a
sense the "most official" syntax is `polarity +1` or `polarity -1`.
Since this has the side effect that `polarity on` /will/ also inevitably
work, I opted to make `polarity off` work as well (meaning `polarity 0`
would have to act like `polarity -1`).
Allowing for arbitrary magnitude was also pretty much a no-brainer,
because it simplifies the implementation, while having the side effect
that it is easier to use in cases where the polarity might be derived
from some computed value.
Post a reply to this message
|
|