mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
@ -9,7 +9,7 @@ fn random_clamped() f64 {
|
||||
|
||||
pub fn activation(a f64) f64 {
|
||||
ap := (-a) / 1
|
||||
return (1 / (1 + math.exp(ap)))
|
||||
return 1 / (1 + math.exp(ap))
|
||||
}
|
||||
|
||||
fn round(a int, b f64) int {
|
||||
|
@ -327,7 +327,7 @@ fn intersect(r Ray, spheres &Sphere, nspheres int) (bool, f64, int) {
|
||||
id = i
|
||||
}
|
||||
}
|
||||
return (t < inf), t, id
|
||||
return t < inf, t, id
|
||||
}
|
||||
|
||||
// some casual random function, try to avoid the 0
|
||||
|
@ -15,7 +15,7 @@ import os
|
||||
import strconv
|
||||
|
||||
fn evala(i int, j int) int {
|
||||
return ((i + j) * (i + j + 1) / 2 + i + 1)
|
||||
return (i + j) * (i + j + 1) / 2 + i + 1
|
||||
}
|
||||
|
||||
fn times(mut v []f64, u []f64) {
|
||||
|
Reference in New Issue
Block a user