pub struct PixelIntensity {
pub zn: f32,
pub count: f32,
}
Expand description
Represents the intensity of a pixel in fractal rendering, particularly in the context of iterations.
Attributes:
zn
: Af32
representing the magnitude at the end of the iteration process. This is typically used to determine the color or intensity of a pixel in fractal images.count
: Af32
reflecting the number of iterations performed, normalized by the maximum number of iterations. This value is often used to apply color gradients based on the iteration depth.
Fields§
§zn: f32
§count: f32
Implementations§
Source§impl PixelIntensity
impl PixelIntensity
Sourcepub fn new(zn: f32, count: f32) -> PixelIntensity
pub fn new(zn: f32, count: f32) -> PixelIntensity
Creates a new PixelIntensity
with the specified resolution and pixel data.
§Arguments
zn
: Af32
representing the magnitude at the end of the iteration process. This is typically used to determine the color or intensity of a pixel in fractal images.count
: Af32
reflecting the number of iterations performed, normalized by the maximum number of iterations. This value is often used to apply color gradients based on the iteration depth. A newPixelIntensity
with the specified resolution and pixel data.
pub fn vec_data_to_pixel_intensity_matrix( vec_data: Vec<u8>, ) -> Vec<PixelIntensity>
Trait Implementations§
Source§impl Clone for PixelIntensity
impl Clone for PixelIntensity
Source§fn clone(&self) -> PixelIntensity
fn clone(&self) -> PixelIntensity
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for PixelIntensity
impl Debug for PixelIntensity
Source§impl PartialEq for PixelIntensity
impl PartialEq for PixelIntensity
impl Copy for PixelIntensity
impl StructuralPartialEq for PixelIntensity
Auto Trait Implementations§
impl Freeze for PixelIntensity
impl RefUnwindSafe for PixelIntensity
impl Send for PixelIntensity
impl Sync for PixelIntensity
impl Unpin for PixelIntensity
impl UnwindSafe for PixelIntensity
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more