Skip to content

Commit

Permalink
Version 0.4.1 Release [Bugfix]
Browse files Browse the repository at this point in the history
Bugfix release
  • Loading branch information
Dreaming381 committed Sep 17, 2021
1 parent e98dc08 commit a3a9eee
Show file tree
Hide file tree
Showing 48 changed files with 8,345 additions and 845 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic
Versioning](http://semver.org/spec/v2.0.0.html).

## [0.4.1] – 2021-9-16

Officially supports Entities [0.17.0]

### Changed

- Updated Core to v0.4.1
- Updated Psyshock to v0.4.1
- Added Optimization Adventure 6

## [0.4.0] – 2021-8-9

Officially supports Entities [0.17.0]
Expand Down
36 changes: 36 additions & 0 deletions Core/Core/Math/simd.math.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ public static float4 distancesq(simdFloat3 a, simdFloat3 b)

public static float4 lengthsq(simdFloat3 a) => dot(a, a);

public static float4 length(simdFloat3 a) => math.sqrt(dot(a, a));

public static simdFloat3 select(simdFloat3 a, simdFloat3 b, bool4 c)
{
simdFloat3 result = default;
Expand All @@ -48,6 +50,15 @@ public static simdFloat3 select(simdFloat3 a, simdFloat3 b, bool4 c)
return result;
}

public static simdFloat3 select(simdFloat3 a, simdFloat3 b, bool4 xSelect, bool4 ySelect, bool4 zSelect)
{
simdFloat3 result = default;
result.x = math.select(a.x, b.x, xSelect);
result.y = math.select(a.y, b.y, ySelect);
result.z = math.select(a.z, b.z, zSelect);
return result;
}

/*public static float3 shuffle(simdFloat3 left, simdFloat3 right, math.ShuffleComponent shuffleA)
{
float3 result = default;
Expand Down Expand Up @@ -130,6 +141,31 @@ public static float3 cmaxabcd(simdFloat3 s)
{
return new float3(math.cmax(s.x), math.cmax(s.y), math.cmax(s.z));
}

public static float4 cminxyz(simdFloat3 s)
{
return math.min(math.min(s.x, s.y), s.z);
}

public static float4 cmaxxyz(simdFloat3 s)
{
return math.max(math.max(s.x, s.y), s.z);
}

public static simdFloat3 abs(simdFloat3 s)
{
return new simdFloat3(math.abs(s.x), math.abs(s.y), math.abs(s.z));
}

public static simdFloat3 project(simdFloat3 a, float3 target)
{
return (dot(a, target) / math.dot(target, target)) * new simdFloat3(target);
}

public static bool4 isfiniteallxyz(simdFloat3 s)
{
return math.isfinite(s.x) & math.isfinite(s.y) & math.isfinite(s.z);
}
}
}

16 changes: 16 additions & 0 deletions Documentation~/Core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,22 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic
Versioning](http://semver.org/spec/v2.0.0.html).

## [0.4.1] – 2021-9-16

Officially supports Entities [0.17.0]

### Added

- Added `simd.length()`.
- Added `simd.select()` which allows for selecting the x, y, and z components
using separate masks.
- Added `simd.cminxyz()` and `cmaxxyz()` which computes the min/max between x,
y, and z for each of the four float3 values.
- Added `simd.abs()`.
- Added `simd.project()`.
- Added `simd.isfiniteallxyz()` which returns true for each float3 if the x,
y, and z components are all finite values.

## [0.4.0] – 2021-8-9

Officially supports Entities [0.17.0]
Expand Down
Loading

0 comments on commit a3a9eee

Please sign in to comment.