-
Notifications
You must be signed in to change notification settings - Fork 32
Release notes
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?
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.
Merged #92; implement bytemuck
's Zeroable
and Pod
on matrices and quaternions.
Fixes for #89; provide optional dependency on the az
crate.
Fixes for #86; implement more traits from num-traits
, such as CheckedAdd
.
Fixed #85; fix some compile-time issues with SIMD intrinsics and provide adapted APIs (in particular, reduction and element-wise comparison operations).
Merged #84; upgrade approx
to 0.5 and add a recursion limit for rustc
Fixed #82 by upgrading rustc_version
dependency to 0.4
Fixed #81 by adding methods that both normalize a vector and return the previous magnitude in one operation.
Fixed #80 by adding optional bytemuck
support.
Fixed #75; some crates are now exported via pub extern crate
.
Fixed #73.
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.
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".
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.
Fixed #64 about outdated/insecure dependencies.
Also added cargo audit
to CI scripts.
Also migrated from travis-ci.org
to travis-ci.com
.
Fixed #60 about a build error since Rust 2020-10-04 during macro expansion.
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.
Fixed issue #56: rgb(a) and image features compile error.
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.
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 nowT: Add<Output=T>
instead ofT: std::iter::Sum
. - The requirement for
VecX::product()
is nowT: Mul<Output=T>
instead ofT: std::iter::Product
.
New features:
-
map3()
andapply3()
. They are likemap2()
andapply2()
but with yet an extra argument, which is supposedly useful for operations such as fused-multiply add;mul_add()
could be implemented withmap3()
, but does not actually use it.
Improvements:
-
All reduction operations on vectors have been made as fast as possible, thanks to
advanced hacker techniquesmacro magic, at least for therepr_c
case (I mean, therepr_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 ofdot()
, which in turn improves the performance ofmagnitude()
, 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()
ormap2()
which could introduce some overhead. - Taking advantage of short-circuit semantics for logical operators such as
&&
and||
.
Fixed unfortunate #![missing_docs]
warnings in geom.rs
since the additions of as_()
; I was using double-slash comments instead of triple-slash.
Fixed issue #52, by adding an implementation of as_()
using AsPrimitive
for vector types, as well as matrices and most geometric shapes.
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!
Merged PR #49, adding support for Aabb::projected_point()
and Aabb::distance_from_point()
. Thanks @zesterer!
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.
cargo fix
is great!
Also fixed warnings about deprecated use of mem::uninitialized()
.
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"] }
In particular, the approx
crate, with new traits, which is a breaking change.
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.
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.
There are no release notes for the previous versions, sorry!