POV-Ray : Newsgroups : povray.general : Function: Problem in Defining : Function: Problem in Defining Server Time
8 May 2024 15:32:17 EDT (-0400)
  Function: Problem in Defining  
From: Sven Littkowski
Date: 5 Apr 2018 10:21:21
Message: <5ac630e1$1@news.povray.org>
Hi,

I try to create (for the very first time) an own function, after i saw
it inside the POV-Ray online help files. Well, i do something wrong.

Basically, the purpose of my function is to create a negative or
positive float number, that I then can use to rotate something clockwise
or counter-clockwise. At the moment, it is my brain that is rotating
counter-clockwise.

Can you assist?

---------------------

#declare Number = function(MyNumber)
{
 #declare MyAngle = rand(NySeed)*MyNumber;
 #declare MyPositive = rand(MySeed)*1.0;
 #if(MyPositive<0.5)
  MyAngle*(+1) // no #declare and no ;
 #else
  MyAngle*(-1) // no #declare and no ;
 #end
}

rotate < 0.0, Number(1.2), 0.0 >


ORIGINAL

#declare factorial = function(C)
{
 prod(i, 1, C, i) // no #declare and no ;
}
#declare A = factorial(5);

---
Diese E-Mail wurde von AVG auf Viren geprüft.
http://www.avg.com


Post a reply to this message

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