comparison examples/alotof_triangles.nim @ 519:03a94b905f1a

did: refactor Matrix names
author Sam <sam@basx.dev>
date Fri, 20 Jan 2023 16:36:52 +0700
parents 5d406c17bbcb
children d7d9420ba675
comparison
equal deleted inserted replaced
518:5d406c17bbcb 519:03a94b905f1a
14 dt: Descriptor[float32] 14 dt: Descriptor[float32]
15 15
16 proc globalUpdate(engine: var Engine, dt: float32) = 16 proc globalUpdate(engine: var Engine, dt: float32) =
17 discard 17 discard
18 18
19 proc randomtransform(): Mat33[float32] = 19 proc randomtransform(): TMat33[float32] =
20 let randomscale = scale2d(float32(rand(1.0) + 0.5), float32(rand(1.0) + 0.5)) 20 let randomscale = scale2d(float32(rand(1.0) + 0.5), float32(rand(1.0) + 0.5))
21 let randomrotate = rotate2d(float32(rand(2 * PI))) 21 let randomrotate = rotate2d(float32(rand(2 * PI)))
22 let randomtranslate = translate2d(float32(rand(1.6) - 0.8), float32(rand(1.6) - 0.8)) 22 let randomtranslate = translate2d(float32(rand(1.6) - 0.8), float32(rand(1.6) - 0.8))
23 result = randomtranslate * randomrotate * randomscale 23 result = randomtranslate * randomrotate * randomscale
24 24