mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
vfmt: vfmt examples/*.v
This commit is contained in:
parent
0fa2f6d52c
commit
9e06af8bf9
18 changed files with 191 additions and 162 deletions
|
@ -474,8 +474,11 @@ fn radiance(r Ray, depthi int, scene_id int) Vec {
|
|||
mut tmp := Vec{}
|
||||
if depth > 2 {
|
||||
// Russian roulette
|
||||
tmp = if rand_f64() < pp { radiance(refl_ray, depth, scene_id).mult_s(rp) } else { radiance(Ray{x, tdir},
|
||||
depth, scene_id).mult_s(tp) }
|
||||
tmp = if rand_f64() < pp {
|
||||
radiance(refl_ray, depth, scene_id).mult_s(rp)
|
||||
} else {
|
||||
radiance(Ray{x, tdir}, depth, scene_id).mult_s(tp)
|
||||
}
|
||||
} else {
|
||||
tmp = (radiance(refl_ray, depth, scene_id).mult_s(re)) +
|
||||
(radiance(Ray{x, tdir}, depth, scene_id).mult_s(tr))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue