fn alignement<X: Alignement>(&self, others: Vec<&X>) -> ObjectAlignement {
        //  +--------+  +---------+
        //  |........|  |.........|
        // →+--------+ →+---------+

        if others.iter().all(|elem| elem.y() == self.y()) {
            return ObjectAlignement::HorizontalAligned;
        }

        //              +-------------+
        //  +--------+  |             |
        // →|    +   | →|      +      |
        //  +--------+  |             |
        //              +-------------+

        if others
            .iter()
            .all(|elem| elem.height() / 2.0 + elem.y() == self.height() / 2.0 + self.y())
        {
            return ObjectAlignement::HorizontalCenterAligned;
        }

        //  ↓
        //  +---------+
        //  |         |
        //  +---------+
        //  ↓
        //  +------+
        //  |      |
        //  +------+

        if others.iter().all(|elem| elem.x() == self.x()) {
            return ObjectAlignement::VerticalLeftAligned;
        }

        //         ↓
        //  +------------+
        //  |      +     |
        //  +------------+
        //         ↓
        //    +--------+
        //    |    +   |
        //    +--------+

        if others
            .iter()
            .all(|elem| elem.width() / 2.0 + elem.x() == self.width() / 2.0 + self.x())
        {
            return ObjectAlignement::VerticalCenterAlgined;
        }

        //            ↓
        //  +---------+
        //  |         |
        //  +---------+
        //            ↓
        //     +------+
        //     |      |
        //     +------+

        if others
            .iter()
            .all(|elem| elem.width() + elem.x() == self.width() + self.x())
        {
            return ObjectAlignement::VerticalRightAlgined;
        }

        if others
            .iter()
            .all(|elem| elem.y() == self.y() && elem.x() == self.x())
        {
            return ObjectAlignement::Alinged;
        };

        ObjectAlignement::NonAligned
    }
/// This method returns the alignement of a set of objects
This method returns the alignement of a set of objects
This method returns the alignement of a set of objects
fn alignement<X: Alignement>(&self, others: Vec<&X>) -> ObjectAlignement {
        //  +--------+  +---------+
        //  |........|  |.........|
        // →+--------+ →+---------+
        if others.iter().all(|elem| elem.y() == self.y()) {
            return ObjectAlignement::HorizontalAligned;
        }
        //              +-------------+
        //  +--------+  |             |
        // →|    +   | →|      +      |
        //  +--------+  |             |
        //              +-------------+
        if others
            .iter()
            .all(|elem| elem.height() / 2.0 + elem.y() == self.height() / 2.0 + self.y())
        {
            return ObjectAlignement::HorizontalCenterAligned;
        }
        //  ↓
        //  +---------+
        //  |         |
        //  +---------+
        //  ↓
        //  +------+
        //  |      |
        //  +------+
        if others.iter().all(|elem| elem.x() == self.x()) {
            return ObjectAlignement::VerticalLeftAligned;
        }
        //         ↓
        //  +------------+
        //  |      +     |
        //  +------------+
        //         ↓
        //    +--------+
        //    |    +   |
        //    +--------+
        if others
            .iter()
            .all(|elem| elem.width() / 2.0 + elem.x() == self.width() / 2.0 + self.x())
        {
            return ObjectAlignement::VerticalCenterAlgined;
        }
        //            ↓
        //  +---------+
        //  |         |
        //  +---------+
        //            ↓
        //     +------+
        //     |      |
        //     +------+
        if others
            .iter()
            .all(|elem| elem.width() + elem.x() == self.width() + self.x())
        {
            return ObjectAlignement::VerticalRightAlgined;
        }
        if others
            .iter()
            .all(|elem| elem.y() == self.y() && elem.x() == self.x())
        {
            return ObjectAlignement::Alinged;
        };
        ObjectAlignement::NonAligned
    }
fn alignement < X : Alignement > ( & self , others : Vec < & X > ) -> ObjectAlignement { //  +--------+  +---------+ //  |........|  |.........| // →+--------+ →+---------+ if others . iter ( ) . all ( | elem | elem . y ( ) == self . y ( ) ) { return ObjectAlignement :: HorizontalAligned ; } //              +-------------+ //  +--------+  |             | // →|    +   | →|      +      | //  +--------+  |             | //              +-------------+ if others . iter ( ) . all ( | elem | elem . height ( ) / 2.0 + elem . y ( ) == self . height ( ) / 2.0 + self . y ( ) ) { return ObjectAlignement :: HorizontalCenterAligned ; } //  ↓ //  +---------+ //  |         | //  +---------+ //  ↓ //  +------+ //  |      | //  +------+ if others . iter ( ) . all ( | elem | elem . x ( ) == self . x ( ) ) { return ObjectAlignement :: VerticalLeftAligned ; } //         ↓ //  +------------+ //  |      +     | //  +------------+ //         ↓ //    +--------+ //    |    +   | //    +--------+ if others . iter ( ) . all ( | elem | elem . width ( ) / 2.0 + elem . x ( ) == self . width ( ) / 2.0 + self . x ( ) ) { return ObjectAlignement :: VerticalCenterAlgined ; } //            ↓ //  +---------+ //  |         | //  +---------+ //            ↓ //     +------+ //     |      | //     +------+ if others . iter ( ) . all ( | elem | elem . width ( ) + elem . x ( ) == self . width ( ) + self . x ( ) ) { return ObjectAlignement :: VerticalRightAlgined ; } if others . iter ( ) . all ( | elem | elem . y ( ) == self . y ( ) && elem . x ( ) == self . x ( ) ) { return ObjectAlignement :: Alinged ; } ; ObjectAlignement :: NonAligned }
This method returns the alignement of a set of objects
This method returns the alignement of a set of objects
&self
others
Vec<&X>