feat: solver improvements + release v0.29.0 (#876)
* feat: solver improvements * feat: add function to get/set whether gyroscopic forces are enabled on a rigid-body * chore: switch to released versions of parry and wide instead of local patches * fix cargo doc * chore: typo fixes * chore: clippy fix * Release v0.29.0 * chore: more clippy fixes
This commit is contained in:
28
src/lib.rs
28
src/lib.rs
@@ -15,6 +15,7 @@
|
||||
#![allow(clippy::too_many_arguments)]
|
||||
#![allow(clippy::needless_range_loop)] // TODO: remove this? I find that in the math code using indices adds clarity.
|
||||
#![allow(clippy::module_inception)]
|
||||
#![cfg_attr(feature = "simd-nightly", feature(portable_simd))]
|
||||
|
||||
#[cfg(all(feature = "dim2", feature = "f32"))]
|
||||
pub extern crate parry2d as parry;
|
||||
@@ -53,16 +54,41 @@ macro_rules! enable_flush_to_zero(
|
||||
}
|
||||
);
|
||||
|
||||
#[cfg(feature = "simd-is-enabled")]
|
||||
macro_rules! gather(
|
||||
($callback: expr) => {
|
||||
{
|
||||
#[inline(always)]
|
||||
#[allow(dead_code)]
|
||||
#[cfg(not(feature = "simd-is-enabled"))]
|
||||
fn create_arr<T>(mut callback: impl FnMut(usize) -> T) -> T {
|
||||
callback(0usize)
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
#[allow(dead_code)]
|
||||
#[cfg(feature = "simd-is-enabled")]
|
||||
fn create_arr<T>(mut callback: impl FnMut(usize) -> T) -> [T; SIMD_WIDTH] {
|
||||
[callback(0usize), callback(1usize), callback(2usize), callback(3usize)]
|
||||
}
|
||||
|
||||
|
||||
create_arr($callback)
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
macro_rules! array(
|
||||
($callback: expr) => {
|
||||
{
|
||||
#[inline(always)]
|
||||
#[allow(dead_code)]
|
||||
fn create_arr<T>(mut callback: impl FnMut(usize) -> T) -> [T; SIMD_WIDTH] {
|
||||
#[cfg(not(feature = "simd-is-enabled"))]
|
||||
return [callback(0usize)];
|
||||
#[cfg(feature = "simd-is-enabled")]
|
||||
return [callback(0usize), callback(1usize), callback(2usize), callback(3usize)];
|
||||
}
|
||||
|
||||
create_arr($callback)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user