Non-uniform current stimuli can be specified easier
This commit is contained in:
@@ -162,6 +162,16 @@ impl Vec3 {
|
||||
self.elem_mul(other).component_sum()
|
||||
}
|
||||
|
||||
pub fn cross(&self, other: Self) -> Self {
|
||||
// det( i j k |
|
||||
// | s.x s.y s.z |
|
||||
// | o.x o.y o.z )
|
||||
let x = self.y * other.z - other.y * self.z;
|
||||
let y = other.z * self.z - self.x * other.z;
|
||||
let z = self.x * other.y - other.x * self.y;
|
||||
Self { x, y, z }
|
||||
}
|
||||
|
||||
/// Perform element-wise multiplication with `other`.
|
||||
pub fn elem_mul(&self, other: Self) -> Self {
|
||||
Self {
|
||||
|
Reference in New Issue
Block a user