pub struct YTransform {
pub a: f32,
pub b: f32,
pub view_ref: f64,
pub mapping: PriceMapping,
}Expand description
Value-to-y mapping of a SeriesDraw: y = a * (f(value) - f(view_ref)) + b.
Renderers evaluate it per chunk in f32 as (v_rel + bias) * a with
v_rel = f(value) - f(chunk_ref); use
transform_helpers instead of evaluating it by hand.
Fields§
§a: f32Scale.
b: f32y of view_ref.
view_ref: f64Reference value (in price space) the transform is relative to.
mapping: PriceMappingLinear or logarithmic.
Trait Implementations§
Source§impl Clone for YTransform
impl Clone for YTransform
impl Copy for YTransform
Source§impl Debug for YTransform
impl Debug for YTransform
Source§impl Default for YTransform
impl Default for YTransform
Source§impl PartialEq for YTransform
impl PartialEq for YTransform
impl StructuralPartialEq for YTransform
Auto Trait Implementations§
impl Forget for YTransform
impl Freeze for YTransform
impl Move for YTransform
impl RefUnwindSafe for YTransform
impl Send for YTransform
impl Sync for YTransform
impl Unpin for YTransform
impl UnsafeUnpin for YTransform
impl UnwindSafe for YTransform
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