POV-Ray : Newsgroups : povray.beta-test : Request for help : Re: Request for help Server Time
4 Nov 2024 21:25:50 EST (-0500)
  Re: Request for help  
From:
Date: 27 Sep 2001 04:11:16
Message: <jsl5rt43ngjm9bsg59ishf03u4ghm4621c@4ax.com>
On Sun, 23 Sep 2001 20:09:11 +0200, "Rune"
<run### [at] mobilixnetdk> wrote:

> I currently have the problem that I am not quite aware if all the macros
> in the files arrays.inc

ok. let's start

POV3.5b4 on PII233 128 MB with NT4Sp6

o) first macro: Rand_Array_Item
    it uses floor of rand but rand can return value 1
    which causes error  "array subscript out of range"
    I advice to multiply rand with 0.9999999 or something
    It not change probability very much

o) macro: Resize_Array
     suggested content
    #macro Resize_Array(Arr,NewSize)
      #local NewArray=array[NewSize]
      #local C=0;
      #local Max=min(NewSize,dimension_size(Arr, 1))
      #while (C<Max)
        #local NewArray[C]=Arr[C] // not use ";" !!!
        #local C=C+1;
      #end
      #declare Arr=NewArray
    #end

o)  macro: Reverse_Array
      lines
        #local Array[J] = Array[N-J]
        #local Array[N-J] = Temp
      should be replaced with
        #local Array[J] = Array[N-J-1]
        #local Array[N-J-1] = Temp

o) do you want me to write
    #macro Insert_In_Array(Item, DestArray, Index)
    #macro Insert_Array_In_Array(ItemArray, DestArray, Index)
    #macro Append_To_Array(Item, DestArray, Index)
    #macro Append_Array_To_Array(ItemArray, DestArray, Index)
   ?

o) macro: Sort_Compare
    seems ok

o) macro: Sort_Swap_Data
    there should be no ";" if it is treated as universal macro
    but of couse it could be annoying number of warnings for float
    than there should be some description in comments

o) with sort macros I must concern little more

ABX


Post a reply to this message

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