These reviews are from Crev, a distributed system for code reviews. To add your review, set up cargo-crev.

The current version of euclid is 0.22.10.

0.22.9 (older version) Rating: Positive Thoroughness: Low Understanding: Medium

by kpreid on 2023-09-06

This is a preliminary "does this look okay to use" code review, writing down everything I noticed -- I have not yet attempted to use the library.



  • Has no_std support, in the conventional fashion of a std feature that can be disabled.
  • Depends only on common interop libraries, and optionally libm. All dependencies are optional except num-traits.

API design

Dubious in places.

  • Rect::inner_rect() contains a debug_assert! that the size of the result is not negative, yet this is not an invariant of the type, and the potential panic is not documented.
  • The approxord module contains no items that match its module docs, just max() and min() for PartialOrd rather than only Ord.

The following are “this doesn't exist” rather than “this exists but is bad”:

  • Angle and Rotation2D type are specifically radians. This prevents some opportunities for exact arithmetic on fractions or multiples of whole turns (because 360 is a rational number and 2π is not).
  • There is no Vector4D type, only the specific-purpose HomogeneousVector.


  • Many functions without docs or with not very specific docs.
  • cast() methods have an un-track_callered panic if the underlying num_traits::NumCast fails. On the ones which have documentation at all (e.g. Length), the description of cast() and try_cast() as "Cast" and "Fallible cast" respectively might lead the reader to think that the former is an infallible conversion, not a panicking one.


  • Clippy lint directives in an archaic style from before they were namespaced: #![cfg_attr(feature = "cargo-clippy", allow(just_underscores_and_digits))]
  • Superfluous use mint; items.
  • Default epsilons are a dubious concept in the first place, but particularly, using 1e-6 for f64 as well as f32 seems a bit lax.
  • "All matrix multiplication in this module is in row-vector notation," which seems gratuitously inconsistent with most common notation and with the transform2d and transform3d modules. But perhaps I have misunderstood.

0.20.1 (older version) Rating: Positive Thoroughness: Low Understanding: Medium

by on 2019-08-30

Pleasantly unsurprising. It's just math.

These reviews are from cargo-vet. To add your review, set up cargo-vet and submit your URL to its registry.

The current version of euclid is 0.22.10.

cargo-vet does not verify reviewers' identity. You have to fully trust the source the audits are from.


This crate can be compiled, run, and tested on a local workstation or in controlled automation without surprising consequences. More…

does-not-implement-crypto (implies crypto-safe)

Inspection reveals that the crate in question does not attempt to implement any cryptographic algorithms on its own.

Note that certification of this does not require an expert on all forms of cryptography: it's expected for crates we import to be "good enough" citizens, so they'll at least be forthcoming if they try to implement something cryptographic. When in doubt, please ask an expert.

Implied by other criteria

All crypto algorithms in this crate have been reviewed by a relevant expert.

Note: If a crate does not implement crypto, use does-not-implement-crypto, which implies crypto-safe, but does not require expert review in order to audit for.

safe-to-deploy (implies safe-to-run)

This crate will not introduce a serious security vulnerability to production software exposed to untrusted input. More…


May have been packaged automatically without a review has been able to verify that all files in the crate's tarball are in the crate's repository. Please note that this check is still in beta, and absence of this confirmation does not mean that the files don't match.

Crates in the registry are tarball snapshots uploaded by crates' publishers. The registry is not using crates' git repositories, so there is a possibility that published crates have a misleading repository URL, or contain different code from the code in the repository.

To review the actual code of the crate, it's best to use cargo crev open euclid. Alternatively, you can download the tarball of euclid v0.22.10 or view the source online.