narrow paste scope
This commit is contained in:
parent
c26ce93fc8
commit
e98744871b
@ -6,7 +6,6 @@ use std::cmp::Ordering;
|
|||||||
macro_rules! impl_zeroes{
|
macro_rules! impl_zeroes{
|
||||||
($n:expr)=>{
|
($n:expr)=>{
|
||||||
impl Fixed<$n,{$n*32}>{
|
impl Fixed<$n,{$n*32}>{
|
||||||
paste::item!{
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn zeroes2(a0:Self,a1:Self,a2:Self)->ArrayVec<Ratio<Self,Self>,2>{
|
pub fn zeroes2(a0:Self,a1:Self,a2:Self)->ArrayVec<Ratio<Self,Self>,2>{
|
||||||
let a2pos=match a2.cmp(&Self::ZERO){
|
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::Equal=>return ArrayVec::from_iter(Self::zeroes1(a0,a1).into_iter()),
|
||||||
Ordering::Less=>true,
|
Ordering::Less=>true,
|
||||||
};
|
};
|
||||||
|
paste::item!{
|
||||||
let radicand=a1.[<wide_mul_ $n _ $n>](a1)-a2.[<wide_mul_ $n _ $n>](a0)*4;
|
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){
|
match radicand.cmp(&Fixed::<{$n*2},{$n*2*32}>::ZERO){
|
||||||
Ordering::Greater=>{
|
Ordering::Greater=>{
|
||||||
let planar_radicand=radicand.sqrt().halve_precision();
|
let planar_radicand=radicand.sqrt().halve_precision();
|
||||||
@ -30,7 +31,6 @@ macro_rules! impl_zeroes{
|
|||||||
Ordering::Less=>ArrayVec::new_const(),
|
Ordering::Less=>ArrayVec::new_const(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn zeroes1(a0:Self,a1:Self)->ArrayVec<Ratio<Self,Self>,1>{
|
pub fn zeroes1(a0:Self,a1:Self)->ArrayVec<Ratio<Self,Self>,1>{
|
||||||
if a1==Self::ZERO{
|
if a1==Self::ZERO{
|
||||||
|
Loading…
Reference in New Issue
Block a user