Trait glm::GenBVec
[−]
[src]
pub trait GenBVec: GenVec<bool> + GenBType { fn any(&self) -> bool; fn all(&self) -> bool; fn not(&self) -> Self; }
Generic boolean vector type.
Required Methods
fn any(&self) -> bool
Returns true
if there is any component of the receiver is true
.
Example
use glm::{ GenBVec, bvec2 }; assert!(bvec2(true, false).any()); assert_eq!(bvec2(false, false).all(), false);
fn all(&self) -> bool
Returns true
if all components of the receiver are true
.
Example
use glm::{ GenBVec, bvec2 }; assert_eq!(bvec2(true, false).all(), false); assert_eq!(bvec2(true, true).all(), true);
fn not(&self) -> Self
Returns the component-wise logical complement of the receiver.
Example
use glm::{ GenBVec, bvec2 }; assert_eq!(bvec2(true, false).not(), bvec2(false, true));