55const i16max = Int64 (typemax (Int16))
66const i32max = Int64 (typemax (Int32))
77
8- pack16 (i1:: Integer , i2:: Integer ) = Int64 (i1) + i16max* Int64 (i2)
8+ pack16 (i1:: Integer , i2:: Integer ):: Integer = Int64 (i1) + i16max* Int64 (i2)
99
10- function pack (i1:: Integer , i2:: Integer ,i3:: Integer ,i4:: Integer )
11- @assert (i1 >= 0 && i1 <= typemax (Int16))
12- @assert (i2 >= 0 && i2 <= typemax (Int16))
13- @assert (i3 >= 0 && i3 <= typemax (Int16))
14- @assert (i4 >= 0 && i4 <= typemax (Int16))
15- return pack16 (i1,i2) + i32max* pack16 (i3,i4)
10+ function pack (i1:: Integer , i2:: Integer ,i3:: Integer ,i4:: Integer ):: Integer
11+ @assert (i1 >= 0 && i1 <= typemax (Int16))
12+ @assert (i2 >= 0 && i2 <= typemax (Int16))
13+ @assert (i3 >= 0 && i3 <= typemax (Int16))
14+ @assert (i4 >= 0 && i4 <= typemax (Int16))
15+ return pack16 (i1,i2) + i32max* pack16 (i3,i4)
1616end
1717
1818
4141
4242# ## -------------------computation of pairID -----------------------------------
4343# ## it returns a unique ID
44- function orderPositions (is,i,js,j)
44+ function orderPositions (is,i,js,j):: Integer
4545 if is < js
4646 return pack (is,i,js,j)
4747 elseif is > js
@@ -53,7 +53,7 @@ end; end
5353# getPositionsOfObj(scene::Composition.Scene, obj::Composition.Object3D,
5454# movablePos::Nothing) = (false, 0, 0)
5555function getPositionsOfObj (scene:: Composition.Scene ,
56- obj:: Composition.Object3D , movablePos:: Int64 )
56+ obj:: Composition.Object3D , movablePos:: Int64 ):: Tuple{Bool, Int64, Int64}
5757 if movablePos == 0
5858 return (false , 0 , 0 )
5959 else
6363
6464function computePairID (scene:: Composition.Scene ,
6565 actObj:: Composition.Object3D , nextObj:: Composition.Object3D ,
66- is, i, js, j)
66+ is, i, js, j):: Integer
6767 # is: actual super - object
6868 # js: subsequent super - object
6969 # i: Object3D of is_th super - object
0 commit comments