Skip to content

Release notes

Yoan edited this page May 13, 2024 · 35 revisions

0.17.0

Merged #95; Fix compatibility with latest nightly toolchain version, replacing use of platform_intrinsics with core_intrinsics.
After this, I realized there was a crapton of warnings which I took some time to fix. This wasn't due to the PR itself...

Time went from 2022 to 2024 really quick eh?

0.16.1

Merged #94; Hotfix for changes in #92 because it actually didn't compile with the bytemuck feature, whoops... I too forgot to specify it when compiling.

0.16.0

Merged #92; implement bytemuck's Zeroable and Pod on matrices and quaternions.

0.15.10

Fixes for #89; provide optional dependency on the az crate.

0.15.9

Fixes for #86; implement more traits from num-traits, such as CheckedAdd.

0.15.8

Fixed #85; fix some compile-time issues with SIMD intrinsics and provide adapted APIs (in particular, reduction and element-wise comparison operations).

0.15.7

Merged #84; upgrade approx to 0.5 and add a recursion limit for rustc

0.15.6

Fixed #82 by upgrading rustc_version dependency to 0.4

0.15.5

Fixed #81 by adding methods that both normalize a vector and return the previous magnitude in one operation.

0.15.4

Fixed #80 by adding optional bytemuck support.

0.15.1

Fixed #75; some crates are now exported via pub extern crate.

0.15.0

Fixed #73.

0.14.1

Merged #70.
Fixed #71.

Thanks to with_x(), with_y(), with_z(), with_w(), and From<(Vec2<T>, T)> for Vec3<T> (with similar conversions for Vec4 etc), converting a vector into a bigger vector type is now easier and prettier.

0.14.0

Fixed #66.
The change forces vector types in the repr_simd to actually use #[repr(C)] if their length is non-power-of-two.
This is necessary due to evolving requirements in the Rust compiler; the other alternatives would have been either to completely remove these types, or to add an extra "unused" member. Both are breaking changes and complex to implement.

If you were using Vec3 and Rgb types from repr_simd modules and are that concerned about efficiency, consider using Vec4 and Rgba instead.

Also deprecated some opinionated functions, that assumed a specific mapping from XYZ axii to perceived directions.
To illustrate: Vec3::right() should not be used, because it assumed that the X axis was defined to point to the right, which is not always true; in Unreal Engine 4 for instance, the X axis is defined as the "forward vector".

0.13.1

Fixed #65.
The change rewrites fn min(a: V, b: V) into fn min(a: V0, b: V1) where V, V0 and V1 all implement Into<Self>.
Because the function called .into() on its arguments anyway, there was no reason to enforce that a and b were of the same type.

0.13.0

Fixed #64 about outdated/insecure dependencies.
Also added cargo audit to CI scripts.
Also migrated from travis-ci.org to travis-ci.com.

0.12.1

Fixed #60 about a build error since Rust 2020-10-04 during macro expansion.

0.12.0

Merged PR #58, "Make Display impl respect formatting parameters". In very rare occurences, this may be a breaking change, hence the minor version bump.
Updated docs according to #59, about undefined behavior in primitive casts.

0.11.2

Fixed issue #56: rgb(a) and image features compile error.

0.11.1

This release has two features:

  • Merged PR #55 (Reenable caret versions instead of tilde versions);
  • Introduced the (super experimental!) platform_intrinsics feature, which is obviously disabled by default.

The platform_intrinsics feature enables the use of LLVM SIMD intrinsics for common vector operations such as Add Mul, etc, for repr_simd vectors, using RFC 1199.
Since this is based on an unstable and not-well-documented feature, expect possible internal compiler errors or runtime issues when trying it for the first time.
In most cases however, it should be fine, and could provide good performance boosts in specific scenarios, both in debug and release builds.

0.11.0

The minor version was increased from 0.10 due to a breaking change in the trait requirements for sum() (and product()), which in turn impacts dot(), which impacts many other functions.

The changes in this version were motivated by unacceptably low performance in debug builds, as reported in #53. It does turn out that I've been a bit too "iterator-happy".

Breaking changes :

  • The requirement for VecX::sum() is now T: Add<Output=T> instead of T: std::iter::Sum.
  • The requirement for VecX::product() is now T: Mul<Output=T> instead of T: std::iter::Product.

New features:

  • map3() and apply3(). They are like map2() and apply2() but with yet an extra argument, which is supposedly useful for operations such as fused-multiply add; mul_add() could be implemented with map3(), but does not actually use it.

Improvements:

  • All reduction operations on vectors have been made as fast as possible, thanks to advanced hacker techniques macro magic, at least for the repr_c case (I mean, the repr_simd module does not yet try to be more clever). The optimization applies to:

    • Approximate equality between two vectors;
    • Vector comparisons which return a boolean vector of the same dimension;
    • sum(), which improves the performance of dot(), which in turn improves the performance of magnitude(), etc;
    • product();
    • hadd();
    • is_any_negative(), are_all_positive();
    • reduce_xxx()-style functions;
    • ... and probably some others I have missed.

    The optimization consists of:

    • Preventing the use of iterators entirely;
    • Directly using struct members, without any unneded transform;
    • Directly using the required operator, instead of possibly using map() or map2() which could introduce some overhead.
    • Taking advantage of short-circuit semantics for logical operators such as && and ||.

0.10.4

Fixed unfortunate #![missing_docs] warnings in geom.rs since the additions of as_(); I was using double-slash comments instead of triple-slash.

0.10.3

Fixed issue #52, by adding an implementation of as_() using AsPrimitive for vector types, as well as matrices and most geometric shapes.

0.10.2

Merged PR #50, fixing an issue where the column_major matrix module used crate instead of self, meaning that e.g vek::mat::repr_simd::Mat3 would actually use repr_c. Thanks @Veykril!

0.10.1

Merged PR #49, adding support for Aabb::projected_point() and Aabb::distance_from_point(). Thanks @zesterer!

0.10.0

The minor version was increased from 0.9 because this version introduces minor breaking changes, due to updated dependencies, and minor changes to the API. Please note that this is to be expected from a crate which major version is 0.

Moved to Rust 2018 edition

cargo fix is great!
Also fixed warnings about deprecated use of mem::uninitialized().

True no_std support

A new no_std target was added to the Travis CI script as well, to test for regressions.

To compile on no_std, specify the vek dependency in Cargo.toml like so :

[dependencies]
vek = { version = "0.10.0", default-features = false, features = ["libm"] }

Updated all dependencies

In particular, the approx crate, with new traits, which is a breaking change.

Various robustness improvements

Added Clamp::clamped_minus1_1(), and used it before calling .acos() on a value.

Improved is_normalized(), courtesy of @Imberflur, see PR #48.
Also added a is_magnitude_close_to() helper method.

Some methods now return arrays instead of tuples

The best example is CubicBezier::unit_circle() which returned 4 curves approximating a circle.
Returning a tuple is convenient for deconstructing the result, but makes less sense than an array because what we're really returning is a collection of curves, something one could easily iterate on, and arrays are simply a better fit.

Previous versions

There are no release notes for the previous versions, sorry!