narrow paste scope

This commit is contained in:
Quaternions 2024-09-02 18:05:56 -07:00
parent c26ce93fc8
commit e98744871b

View File

@ -6,7 +6,6 @@ use std::cmp::Ordering;
macro_rules! impl_zeroes{
($n:expr)=>{
impl Fixed<$n,{$n*32}>{
paste::item!{
#[inline]
pub fn zeroes2(a0:Self,a1:Self,a2:Self)->ArrayVec<Ratio<Self,Self>,2>{
let a2pos=match a2.cmp(&Self::ZERO){
@ -14,7 +13,9 @@ macro_rules! impl_zeroes{
Ordering::Equal=>return ArrayVec::from_iter(Self::zeroes1(a0,a1).into_iter()),
Ordering::Less=>true,
};
paste::item!{
let radicand=a1.[<wide_mul_ $n _ $n>](a1)-a2.[<wide_mul_ $n _ $n>](a0)*4;
}
match radicand.cmp(&Fixed::<{$n*2},{$n*2*32}>::ZERO){
Ordering::Greater=>{
let planar_radicand=radicand.sqrt().halve_precision();
@ -30,7 +31,6 @@ macro_rules! impl_zeroes{
Ordering::Less=>ArrayVec::new_const(),
}
}
}
#[inline]
pub fn zeroes1(a0:Self,a1:Self)->ArrayVec<Ratio<Self,Self>,1>{
if a1==Self::ZERO{