pub struct CharacterLevelAttributeFormula {
pub attribute_id: AttributeId,
pub anchor_value: f64,
pub coefficient: f64,
pub exponent: f64,
}Expand description
Per-attribute extrapolation for character levels beyond the authored table.
value(level) = round(anchor_value + coefficient * (level^exponent - anchor_level^exponent)). A flat attribute uses coefficient = 0. The
coefficient/exponent pair is chosen so the value AND its per-level slope
stay continuous with the last authored level (see CharacterLevelFormula).
Fields§
§attribute_id: AttributeId§anchor_value: f64§coefficient: f64§exponent: f64Trait Implementations§
Source§impl Clone for CharacterLevelAttributeFormula
impl Clone for CharacterLevelAttributeFormula
Source§fn clone(&self) -> CharacterLevelAttributeFormula
fn clone(&self) -> CharacterLevelAttributeFormula
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<'de> Deserialize<'de> for CharacterLevelAttributeFormula
impl<'de> Deserialize<'de> for CharacterLevelAttributeFormula
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for CharacterLevelAttributeFormula
impl JsonSchema for CharacterLevelAttributeFormula
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for CharacterLevelAttributeFormula
impl PartialEq for CharacterLevelAttributeFormula
Source§fn eq(&self, other: &CharacterLevelAttributeFormula) -> bool
fn eq(&self, other: &CharacterLevelAttributeFormula) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Tsify for CharacterLevelAttributeFormula
impl Tsify for CharacterLevelAttributeFormula
const DECL: &'static str = "/**\n * Per-attribute extrapolation for character levels beyond the authored table.\n *\n * `value(level) = round(anchor_value + coefficient * (level^exponent -\n * anchor_level^exponent))`. A flat attribute uses `coefficient = 0`. The\n * `coefficient`/`exponent` pair is chosen so the value AND its per-level slope\n * stay continuous with the last authored level (see `CharacterLevelFormula`).\n */\nexport interface CharacterLevelAttributeFormula {\n attribute_id: AttributeId;\n anchor_value: number;\n coefficient: number;\n exponent: number;\n}"
const SERIALIZATION_CONFIG: SerializationConfig
type JsType = JsType
fn into_js(&self) -> Result<Self::JsType, Error>where
Self: Serialize,
fn from_js<T>(js: T) -> Result<Self, Error>
impl StructuralPartialEq for CharacterLevelAttributeFormula
Auto Trait Implementations§
impl Freeze for CharacterLevelAttributeFormula
impl RefUnwindSafe for CharacterLevelAttributeFormula
impl Send for CharacterLevelAttributeFormula
impl Sync for CharacterLevelAttributeFormula
impl Unpin for CharacterLevelAttributeFormula
impl UnwindSafe for CharacterLevelAttributeFormula
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