fn try_antiprism_with(
        &self,
        sphere: &Hypersphere<f64>,
        height: f64,
    ) -> Result<Self, Self::DualError> {
        let half_height = height / 2.0;
        let vertices = self.vertices().iter().map(|v| v.push(-half_height));
        let dual = self.try_dual_with(sphere)?;
        let dual_vertices = dual.vertices().iter().map(|v| v.push(half_height));

        Ok(self.antiprism_with_vertices(vertices, dual_vertices))
    }
/// Builds an [antiprism](https://polytope.miraheze.org/wiki/Antiprism)
/// based on a given polytope. Uses the specified [`Hypersphere`] to build
/// the dual base, and separates the bases by the given height.
Builds an [antiprism]
based on a given polytope. Uses the specified [`Hypersphere`] to build
the dual base, and separates the bases by the given height.
Builds an [ antiprism ] based on a given polytope . Uses the specified [ ` Hypersphere ` ] to build the dual base and separates the bases by the given height .
fn try_antiprism_with(
        &self,
        sphere: &Hypersphere<f64>,
        height: f64,
    ) -> Result<Self, Self::DualError> {
        let half_height = height / 2.0;
        let vertices = self.vertices().iter().map(|v| v.push(-half_height));
        let dual = self.try_dual_with(sphere)?;
        let dual_vertices = dual.vertices().iter().map(|v| v.push(half_height));
        Ok(self.antiprism_with_vertices(vertices, dual_vertices))
    }
fn try_antiprism_with ( & self , sphere : & Hypersphere < f64 > , height : f64 , ) -> Result < Self , Self :: DualError > { let half_height = height / 2.0 ; let vertices = self . vertices ( ) . iter ( ) . map ( | v | v . push ( - half_height ) ) ; let dual = self . try_dual_with ( sphere ) ? ; let dual_vertices = dual . vertices ( ) . iter ( ) . map ( | v | v . push ( half_height ) ) ; Ok ( self . antiprism_with_vertices ( vertices , dual_vertices ) ) }
Builds an [antiprism](https://polytope.miraheze.org/wiki/Antiprism)
based on a given polytope.
Builds an [ antiprism ] ( https : // polytope . miraheze . org / wiki / Antiprism ) based on a given polytope .
&self
sphere
&Hypersphere<f64>
height
f64