crystal_packing 0.6.0

Core library for packing shapes in an infinite crystal lattice.
Documentation
//
// line2_ops.rs
// Copyright (C) 2019 Malcolm Ramsay <malramsay64@gmail.com>
// Distributed under terms of the MIT license.
//

#![allow(clippy::op_ref)]
use std::ops::Mul;

use super::Line2;
use crate::Transform2;

binop_impl_all!(
    Mul, mul;
    self: Transform2, rhs: Line2, Output = Line2;
    [ref ref] => {
        Line2 {
            start: self * rhs.start,
            end: self * rhs.end,
        }
    };
);

binop_impl_all!(
    Mul, mul;
    self: Line2, rhs: Transform2, Output = Line2;
    [ref ref] => {
        Line2 {
            start: rhs * self.start,
            end: rhs * self.end,
        }
    };
);