POV-Ray : Newsgroups : povray.general : Bug - sgn() function Server Time
5 Aug 2024 22:13:54 EDT (-0400)
  Bug - sgn() function (Message 4 to 13 of 13)  
<<< Previous 3 Messages Goto Initial 10 Messages
From: Christopher James Huff
Subject: Re: Bug - sgn() function
Date: 8 Aug 2002 14:15:02
Message: <chrishuff-4EB27F.13050908082002@netplex.aussie.org>
In article <Xns### [at] 204213191226>,
 "Rafal 'Raf256' Maj" <raf### [at] raf256com> wrote:

> > I used only a simple statement such as: "#declare Value1=sgn(-3);".
> 
> looks like bug IMHO

Not a bug, just a user misunderstanding, see the answer by Christoph. It 
wasn't recognized as a function because it wasn't declared.

-- 
Christopher James Huff <chr### [at] maccom>
POV-Ray TAG e-mail: chr### [at] tagpovrayorg
TAG web site: http://tag.povray.org/


Post a reply to this message

From: Philippe Debar
Subject: Re: Bug - sgn() function
Date: 8 Aug 2002 17:02:25
Message: <3d52dc61$1@news.povray.org>
"Christoph Hormann" <chr### [at] gmxde> wrote in message
news:3D5### [at] gmxde...
>
>
> Demevec wrote:
> >
> > [...]
> >
> > I used only a simple statement such as: "#declare Value1=sgn(-3);".
> >
> > Could someone help me verify if this is a bug or maybe a workaround if
it is
> > or etc.
>
> You need to add
>
> #include "math.inc"
>
> before using the sgn() function.

I think we will see a good number of such question, as it's not very clear
in the doc if you get there by doing a search. Should it be added to the
VFAQ ?



Povingly,

Philippe


Post a reply to this message

From: Christoph Hormann
Subject: Re: Bug - sgn() function
Date: 8 Aug 2002 17:23:02
Message: <3D52E135.768AB19B@gmx.de>
Philippe Debar wrote:
> 
> I think we will see a good number of such question, as it's not very clear
> in the doc if you get there by doing a search. Should it be added to the
> VFAQ ?


is part of the math.inc description.  What's unclear about that?

Christoph

-- 
POV-Ray tutorials, IsoWood include,                 
TransSkin and more: http://www.tu-bs.de/~y0013390/  
Last updated 03 Aug. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Philippe Debar
Subject: Re: Bug - sgn() function
Date: 9 Aug 2002 04:08:30
Message: <3d53787e$1@news.povray.org>
Christoph Hormann wrote:
> Hmm, searching for 'sgn' finds "7.10.1  Float functions and macros" which
> is part of the math.inc description.  What's unclear about that?

That it is part of math.inc description. I find it far from obvious if 
you do not know by hearth the doc's numbering system. (At least on Win 
it is not obvious.)



Philippe


Post a reply to this message

From: Philippe Lhoste
Subject: Re: Bug - sgn() function
Date: 9 Aug 2002 06:22:53
Message: <Xns92657DC807740PhiLho@204.213.191.226>
Christoph Hormann <chr### [at] gmxde> wrote in
news:3D52E135.768AB19B@gmx.de: 

> Philippe Debar wrote:
>> 
>> I think we will see a good number of such question, as it's not very
>> clear in the doc if you get there by doing a search. Should it be
>> added to the VFAQ ?
> 

> which is part of the math.inc description.  What's unclear about that?

I had to go to the previous page to see it is in the math.inc description. 
When you are a (confused) newbie, this is not obvious, it could have been 
a page from the SDL (except for the macro stuff).

-- 
--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--
Philippe Lhoste (Paris -- France)
Professional programmer and amateur artist
http://jove.prohosting.com/~philho/


Post a reply to this message

From: ingo
Subject: Re: Bug - sgn() function
Date: 9 Aug 2002 06:53:03
Message: <Xns926583BC61F08seed7@povray.org>
in news:3d52dc61$1@news.povray.org Philippe Debar wrote:

> Should it be added to the
> VFAQ ?
> 

No,

see http://www.povray.org/working-docs/id000256.html#7_10_1

Better?

Ingo


Post a reply to this message

From: Christoph Hormann
Subject: Re: Bug - sgn() function
Date: 9 Aug 2002 07:09:31
Message: <3D53A2EA.3F0A36AB@gmx.de>
ingo wrote:
> 
> [...]
> 
> see http://www.povray.org/working-docs/id000256.html#7_10_1
> 
> Better?

Well, it will look a bit strange in the HTML Help tree view or in the
table of contents:

* 7.10 math.inc
    - 7.10.1 math.inc - Float functions and macros
    - 7.10.2 math.inc - Vector functions and macros


I think it's mainly a limitation of the HTML Help system that the chapter
headings are not visible on the subchapter pages. 

Christoph

-- 
POV-Ray tutorials, IsoWood include,                 
TransSkin and more: http://www.tu-bs.de/~y0013390/  
Last updated 03 Aug. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: ingo
Subject: Re: Bug - sgn() function
Date: 9 Aug 2002 07:22:05
Message: <Xns926588A97BFA7seed7@povray.org>
in news:3D53A2EA.3F0A36AB@gmx.de Christoph Hormann wrote:

> Well, it will look a bit strange in the HTML Help tree view

That's the main reason why I hesitated to put it in when it was first 
suggested (think it was by Tom). But since then it came up a few times, so 
...

Ingo


Post a reply to this message

From: Demevec
Subject: Re: Bug - sgn() function
Date: 9 Aug 2002 11:23:51
Message: <3d53de87$1@news.povray.org>

> > which is part of the math.inc description.  What's unclear about that?
>
> I had to go to the previous page to see it is in the math.inc description.
>
> When you are a (confused) newbie, this is not obvious, it could have been
> a page from the SDL (except for the macro stuff).

I thank you for the information provided, including the alternative macro.

I agree that the documentation in the windows version does not clearly
indicate that the sgn() function is part of math.inc  .  The function and
the include file's name are listed on separate pages of the html
documentation.  You would have to have the "7.10.1" memorized as being in
the section on the include files to have picked it up.

I am technically not a newbie, nor ignorant of the documentation.  I do
think that the suggestion of the index headings/titles be printed on the
pages that are a part of them makes good sense and should be considered as a
desirable improvement.

Thanks again for your assistance.

Demevec


Post a reply to this message

From: Tom Melly
Subject: Re: Bug - sgn() function
Date: 9 Aug 2002 12:13:39
Message: <3d53ea33$1@news.povray.org>
"Christoph Hormann" <chr### [at] gmxde> wrote in message
news:3D52E135.768AB19B@gmx.de...
>
>
> Hmm, searching for 'sgn' finds "7.10.1 Float functions and macros" which
> is part of the math.inc description.  What's unclear about that?
>

As a general comment, not including a required file seems to be a common
"gotcha", and not just for new users.

Some kind of mention of this in the VFAQ might be a good idea. The problem is,
IMHO, that these things look like part of the SDL.


Post a reply to this message

<<< Previous 3 Messages Goto Initial 10 Messages

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