POV-Ray : Newsgroups : povray.general : Spline Sweep / While: The Tragedy of the Last Comma : Re: Spline Sweep / While: The Tragedy of the Last Comma Server Time
19 Apr 2024 05:19:05 EDT (-0400)
  Re: Spline Sweep / While: The Tragedy of the Last Comma  
From: Alain
Date: 23 Feb 2018 22:28:31
Message: <5a90dbdf$1@news.povray.org>
Le 18-02-23 à 15:50, Sven Littkowski a écrit :
> What smart ways do you know of, to add or not add the comma for each
> spline sweet element but the last one?
> 

If you are confident that you never have negative radius, you can 
completely do away with the comas.

General rule : Comas are optional in all cases where the separation 
between consecutive values is unambiguous. The only case where it can be 
ambiguous is the case of a negative value that will be interpreted as an 
operation.

1 1 1 is equivalent to 1,1,1
1, -1 1 is OK, but 1 -1 1 will be interpreted as (1-1) 1 or 0 1

Alain


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.