Mercurial > games > semicongine
changeset 1111:774d881be68c
undid: some ugly formatting
author | sam <sam@basx.dev> |
---|---|
date | Sat, 13 Apr 2024 21:31:40 +0700 |
parents | b382ffab50a3 |
children | 8dc855e516b4 |
files | semicongine/core/vector.nim |
diffstat | 1 files changed, 5 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/semicongine/core/vector.nim Sat Apr 13 18:22:43 2024 +0700 +++ b/semicongine/core/vector.nim Sat Apr 13 21:31:40 2024 +0700 @@ -110,16 +110,11 @@ func `$`*(v: TVec4[SomeNumber]): string = toString[TVec4[SomeNumber]](v) func length*(vec: TVec2[SomeFloat]): auto = sqrt(vec[0] * vec[0] + vec[1] * vec[1]) -func length*(vec: TVec2[SomeInteger]): auto = sqrt(float(vec[0] * vec[0] + vec[ - 1] * vec[1])) -func length*(vec: TVec3[SomeFloat]): auto = sqrt(vec[0] * vec[0] + vec[1] * vec[ - 1] + vec[2] * vec[2]) -func length*(vec: TVec3[SomeInteger]): auto = sqrt(float(vec[0] * vec[0] + vec[ - 1] * vec[1] + vec[2] * vec[2])) -func length*(vec: TVec4[SomeFloat]): auto = sqrt(vec[0] * vec[0] + vec[1] * vec[ - 1] + vec[2] * vec[2] + vec[3] * vec[3]) -func length*(vec: TVec4[SomeInteger]): auto = sqrt(float(vec[0] * vec[0] + vec[ - 1] * vec[1] + vec[2] * vec[2] + vec[3] * vec[3])) +func length*(vec: TVec2[SomeInteger]): auto = sqrt(float(vec[0] * vec[0] + vec[1] * vec[1])) +func length*(vec: TVec3[SomeFloat]): auto = sqrt(vec[0] * vec[0] + vec[1] * vec[1] + vec[2] * vec[2]) +func length*(vec: TVec3[SomeInteger]): auto = sqrt(float(vec[0] * vec[0] + vec[1] * vec[1] + vec[2] * vec[2])) +func length*(vec: TVec4[SomeFloat]): auto = sqrt(vec[0] * vec[0] + vec[1] * vec[1] + vec[2] * vec[2] + vec[3] * vec[3]) +func length*(vec: TVec4[SomeInteger]): auto = sqrt(float(vec[0] * vec[0] + vec[1] * vec[1] + vec[2] * vec[2] + vec[3] * vec[3])) func normalized*[T: SomeFloat](vec: TVec2[T]): auto = let l = vec.length