Skip to content

Release notes

Yoan edited this page Jan 21, 2021 · 35 revisions

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!

Clone this wiki locally