diff options
| author | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2025-10-09 19:56:21 +0200 |
|---|---|---|
| committer | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2025-10-09 19:56:21 +0200 |
| commit | c4c2431997d1854fe9d746e04a240239a88aab6d (patch) | |
| tree | a6f91d90063a1aaeb020355c5addbacf4e2a7227 | |
| parent | b8fdd91c9fdbd41f0a5a385cf25c67de5f980edc (diff) | |
Package lines for `core:math` and more.
| -rw-r--r-- | core/log/log.odin | 1 | ||||
| -rw-r--r-- | core/math/big/api.odin | 4 | ||||
| -rw-r--r-- | core/math/big/common.odin | 5 | ||||
| -rw-r--r-- | core/math/big/doc.odin | 7 | ||||
| -rw-r--r-- | core/math/big/helpers.odin | 5 | ||||
| -rw-r--r-- | core/math/big/internal.odin | 4 | ||||
| -rw-r--r-- | core/math/big/logical.odin | 5 | ||||
| -rw-r--r-- | core/math/big/prime.odin | 5 | ||||
| -rw-r--r-- | core/math/big/private.odin | 5 | ||||
| -rw-r--r-- | core/math/big/public.odin | 5 | ||||
| -rw-r--r-- | core/math/big/radix.odin | 5 | ||||
| -rw-r--r-- | core/math/big/tune.odin | 6 | ||||
| -rw-r--r-- | core/math/bits/bits.odin | 1 | ||||
| -rw-r--r-- | core/math/cmplx/cmplx.odin | 1 | ||||
| -rw-r--r-- | core/math/ease/ease.odin | 2 | ||||
| -rw-r--r-- | core/math/fixed/fixed.odin | 1 | ||||
| -rw-r--r-- | core/math/linalg/doc.odin | 2 | ||||
| -rw-r--r-- | core/math/linalg/glsl/linalg_glsl.odin | 2 | ||||
| -rw-r--r-- | core/math/linalg/hlsl/linalg_hlsl.odin | 2 | ||||
| -rw-r--r-- | core/math/math.odin | 1 | ||||
| -rw-r--r-- | core/math/noise/internal.odin | 5 | ||||
| -rw-r--r-- | core/math/noise/opensimplex2.odin | 2 | ||||
| -rw-r--r-- | core/math/rand/rand.odin | 5 |
23 files changed, 39 insertions, 42 deletions
diff --git a/core/log/log.odin b/core/log/log.odin index b2efe8beb..892132255 100644 --- a/core/log/log.odin +++ b/core/log/log.odin @@ -1,3 +1,4 @@ +// package log implements the context.Logger interface. package log import "base:runtime" diff --git a/core/math/big/api.odin b/core/math/big/api.odin index 70e134a90..668afa534 100644 --- a/core/math/big/api.odin +++ b/core/math/big/api.odin @@ -1,3 +1,5 @@ +package math_big + /* Copyright 2021 Jeroen van Rijn <nom@duclavier.com>. Made available under Odin's BSD-3 license. @@ -5,8 +7,6 @@ This file collects public proc maps and their aliases. */ - -package math_big /* === === === === === === === === === === === === === === === === === === === === === === === === diff --git a/core/math/big/common.odin b/core/math/big/common.odin index 22655293f..66a29e715 100644 --- a/core/math/big/common.odin +++ b/core/math/big/common.odin @@ -1,11 +1,10 @@ +package math_big + /* Copyright 2021 Jeroen van Rijn <nom@duclavier.com>. Made available under Odin's BSD-3 license. */ - -package math_big - import "base:intrinsics" /* diff --git a/core/math/big/doc.odin b/core/math/big/doc.odin index 0f9b88d01..04650d6dc 100644 --- a/core/math/big/doc.odin +++ b/core/math/big/doc.odin @@ -1,6 +1,7 @@ +// package big implements arbitrary precision integers and rationals. +package math_big + /* -A BigInt implementation in Odin. For the theoretical underpinnings, see Knuth's The Art of Computer Programming, Volume 2, section 4.3. The code started out as an idiomatic source port of libTomMath, which is in the public domain, with thanks. -*/ -package math_big +*/
\ No newline at end of file diff --git a/core/math/big/helpers.odin b/core/math/big/helpers.odin index 9ee35c45a..e8dc792c6 100644 --- a/core/math/big/helpers.odin +++ b/core/math/big/helpers.odin @@ -1,11 +1,10 @@ +package math_big + /* Copyright 2021 Jeroen van Rijn <nom@duclavier.com>. Made available under Odin's BSD-3 license. */ - -package math_big - import "base:intrinsics" import "base:runtime" import rnd "core:math/rand" diff --git a/core/math/big/internal.odin b/core/math/big/internal.odin index e0bc1ae06..4b76f3b2e 100644 --- a/core/math/big/internal.odin +++ b/core/math/big/internal.odin @@ -1,3 +1,5 @@ +package math_big + /* Copyright 2021 Jeroen van Rijn <nom@duclavier.com>. Made available under Odin's BSD-3 license. @@ -25,8 +27,6 @@ TODO: Handle +/- Infinity and NaN. */ -package math_big - import "base:builtin" import "base:intrinsics" import "core:mem" diff --git a/core/math/big/logical.odin b/core/math/big/logical.odin index 00134228b..df7744a9a 100644 --- a/core/math/big/logical.odin +++ b/core/math/big/logical.odin @@ -1,3 +1,5 @@ +package math_big + /* Copyright 2021 Jeroen van Rijn <nom@duclavier.com>. Made available under Odin's BSD-3 license. @@ -9,9 +11,6 @@ This file contains logical operations like `and`, `or` and `xor`. */ - -package math_big - /* The `and`, `or` and `xor` binops differ in two lines only. We could handle those with a switch, but that adds overhead. diff --git a/core/math/big/prime.odin b/core/math/big/prime.odin index 832c75119..8efa97174 100644 --- a/core/math/big/prime.odin +++ b/core/math/big/prime.odin @@ -1,3 +1,5 @@ +package math_big + /* Copyright 2021 Jeroen van Rijn <nom@duclavier.com>. Made available under Odin's BSD-3 license. @@ -9,9 +11,6 @@ This file contains prime finding operations. */ - -package math_big - /* Determines if an Integer is divisible by one of the _PRIME_TABLE primes. Returns true if it is, false if not. diff --git a/core/math/big/private.odin b/core/math/big/private.odin index c42bad0c6..692b1d088 100644 --- a/core/math/big/private.odin +++ b/core/math/big/private.odin @@ -1,3 +1,5 @@ +package math_big + /* Copyright 2021 Jeroen van Rijn <nom@duclavier.com>. Made available under Odin's BSD-3 license. @@ -16,9 +18,6 @@ These aren't exported for the same reasons. */ - -package math_big - import "base:intrinsics" import "core:mem" diff --git a/core/math/big/public.odin b/core/math/big/public.odin index 070c45283..ed929a09d 100644 --- a/core/math/big/public.odin +++ b/core/math/big/public.odin @@ -1,3 +1,5 @@ +package math_big
+
/*
Copyright 2021 Jeroen van Rijn <nom@duclavier.com>.
Made available under Odin's BSD-3 license.
@@ -9,9 +11,6 @@ This file contains basic arithmetic operations like `add`, `sub`, `mul`, `div`, ...
*/
-
-package math_big
-
import "base:intrinsics"
/*
diff --git a/core/math/big/radix.odin b/core/math/big/radix.odin index 73c4452ac..bc9ae068d 100644 --- a/core/math/big/radix.odin +++ b/core/math/big/radix.odin @@ -1,3 +1,5 @@ +package math_big + /* Copyright 2021 Jeroen van Rijn <nom@duclavier.com>. Made available under Odin's BSD-3 license. @@ -13,9 +15,6 @@ - Also look at extracting and splatting several digits at once. */ - -package math_big - import "base:intrinsics" import "core:mem" import "core:os" diff --git a/core/math/big/tune.odin b/core/math/big/tune.odin index eab36b951..1d24a1325 100644 --- a/core/math/big/tune.odin +++ b/core/math/big/tune.odin @@ -1,3 +1,6 @@ +#+build ignore +package math_big + /* Copyright 2021 Jeroen van Rijn <nom@duclavier.com>. Made available under Odin's BSD-3 license. @@ -7,9 +10,6 @@ The code started out as an idiomatic source port of libTomMath, which is in the public domain, with thanks. */ -#+build ignore -package math_big - import "core:time" import "base:runtime" diff --git a/core/math/bits/bits.odin b/core/math/bits/bits.odin index 154b5a142..f9059f7d8 100644 --- a/core/math/bits/bits.odin +++ b/core/math/bits/bits.odin @@ -1,3 +1,4 @@ +// package bits implements bit-level operations, including the ability to set or toggle individual bits in an integer. package math_bits import "base:intrinsics" diff --git a/core/math/cmplx/cmplx.odin b/core/math/cmplx/cmplx.odin index d1c70ca61..3249cc4b4 100644 --- a/core/math/cmplx/cmplx.odin +++ b/core/math/cmplx/cmplx.odin @@ -1,3 +1,4 @@ +// package cmplx implements trigonometric and other mathematic operations on complex numbers. package math_cmplx import "base:builtin" diff --git a/core/math/ease/ease.odin b/core/math/ease/ease.odin index 5ed0dd56a..2d6a7c924 100644 --- a/core/math/ease/ease.odin +++ b/core/math/ease/ease.odin @@ -1,4 +1,4 @@ -// easing procedures and flux easing used for animations +// package ease implements easing procedures and flux easing used for animations. package ease import "core:math" diff --git a/core/math/fixed/fixed.odin b/core/math/fixed/fixed.odin index 9af6d7599..0f0555e4e 100644 --- a/core/math/fixed/fixed.odin +++ b/core/math/fixed/fixed.odin @@ -1,3 +1,4 @@ +// package fixed implements fixed-point rational numbers and conversion to/from `f64`. package math_fixed import "core:math" diff --git a/core/math/linalg/doc.odin b/core/math/linalg/doc.odin index 4bc9b674d..be1686bb8 100644 --- a/core/math/linalg/doc.odin +++ b/core/math/linalg/doc.odin @@ -1,2 +1,2 @@ -// core:math/linalg implements linear algebra procedures useful for 3D spatial transformations +// package linalg implements linear algebra procedures useful for 3D spatial transformations. package linalg diff --git a/core/math/linalg/glsl/linalg_glsl.odin b/core/math/linalg/glsl/linalg_glsl.odin index bd2cf416a..c24908b0f 100644 --- a/core/math/linalg/glsl/linalg_glsl.odin +++ b/core/math/linalg/glsl/linalg_glsl.odin @@ -1,4 +1,4 @@ -// core:math/linalg/glsl implements a GLSL-like mathematics library plus numerous other utility procedures +// package glsl implements a GLSL-like mathematics library plus numerous other utility procedures. package math_linalg_glsl import "base:builtin" diff --git a/core/math/linalg/hlsl/linalg_hlsl.odin b/core/math/linalg/hlsl/linalg_hlsl.odin index cca70f9c8..3993f7055 100644 --- a/core/math/linalg/hlsl/linalg_hlsl.odin +++ b/core/math/linalg/hlsl/linalg_hlsl.odin @@ -1,4 +1,4 @@ -// core:math/linalg/hlsl implements a HLSL-like mathematics library plus numerous other utility procedures +// package hlsl implements a HLSL-like mathematics library plus numerous other utility procedures. package math_linalg_hlsl import "base:builtin" diff --git a/core/math/math.odin b/core/math/math.odin index b399b4dac..39f2be42c 100644 --- a/core/math/math.odin +++ b/core/math/math.odin @@ -1,3 +1,4 @@ +// package math implements typical trignometric and other basic math routines. package math import "base:intrinsics" diff --git a/core/math/noise/internal.odin b/core/math/noise/internal.odin index f75c0ee87..af3e16ad8 100644 --- a/core/math/noise/internal.odin +++ b/core/math/noise/internal.odin @@ -1,11 +1,12 @@ +#+private +package math_noise + /* OpenSimplex2 noise implementation. Ported from https://github.com/KdotJPG/OpenSimplex2. Copyright 2022 Yuki2 (https://github.com/NoahR02) */ -#+private -package math_noise /* Private implementation details follow. diff --git a/core/math/noise/opensimplex2.odin b/core/math/noise/opensimplex2.odin index 634c32948..08ff3c938 100644 --- a/core/math/noise/opensimplex2.odin +++ b/core/math/noise/opensimplex2.odin @@ -1,5 +1,5 @@ /* - OpenSimplex2 noise implementation. + package noise implements the OpenSimplex2 noise algorithm. Ported from [[ https://github.com/KdotJPG/OpenSimplex2 }]. Copyright 2022 Yuki2 [[ https://github.com/NoahR02 ]] diff --git a/core/math/rand/rand.odin b/core/math/rand/rand.odin index 6b9a73395..4feecc8bb 100644 --- a/core/math/rand/rand.odin +++ b/core/math/rand/rand.odin @@ -1,7 +1,4 @@ - -/* -Package core:math/rand implements various random number generators -*/ +// package rand implements various random number generators. package rand import "base:intrinsics" |