pub struct TargetPoint {
pub temperature: i64,
pub humidity: i64,
pub continentalness: i64,
pub erosion: i64,
pub depth: i64,
pub weirdness: i64,
}Expand description
A target point representing sampled climate values.
All values are quantized (multiplied by 10000) to match vanilla’s integer-based distance calculations. This avoids floating-point precision issues in biome lookup.
Fields§
§temperature: i64Temperature parameter
humidity: i64Humidity/vegetation parameter
continentalness: i64Continentalness parameter (inland vs ocean)
erosion: i64Erosion parameter
depth: i64Depth parameter (surface vs underground)
weirdness: i64Weirdness/ridges parameter
Implementations§
Source§impl TargetPoint
impl TargetPoint
Sourcepub const fn new(
temperature: i64,
humidity: i64,
continentalness: i64,
erosion: i64,
depth: i64,
weirdness: i64,
) -> Self
pub const fn new( temperature: i64, humidity: i64, continentalness: i64, erosion: i64, depth: i64, weirdness: i64, ) -> Self
Create a new target point with quantized values.
Sourcepub fn from_floats(
temperature: f64,
humidity: f64,
continentalness: f64,
erosion: f64,
depth: f64,
weirdness: f64,
) -> Self
pub fn from_floats( temperature: f64, humidity: f64, continentalness: f64, erosion: f64, depth: f64, weirdness: f64, ) -> Self
Create a target point from f64 values (will be quantized).
Sourcepub const fn to_parameter_array(self) -> [i64; 7]
pub const fn to_parameter_array(self) -> [i64; 7]
Convert to a 7-element array for tree lookups. The 7th element is always 0 (offset position).
Trait Implementations§
Source§impl Clone for TargetPoint
impl Clone for TargetPoint
Source§fn clone(&self) -> TargetPoint
fn clone(&self) -> TargetPoint
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for TargetPoint
Source§impl Debug for TargetPoint
impl Debug for TargetPoint
impl Eq for TargetPoint
Source§impl PartialEq for TargetPoint
impl PartialEq for TargetPoint
Source§fn eq(&self, other: &TargetPoint) -> bool
fn eq(&self, other: &TargetPoint) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for TargetPoint
Auto Trait Implementations§
impl Freeze for TargetPoint
impl RefUnwindSafe for TargetPoint
impl Send for TargetPoint
impl Sync for TargetPoint
impl Unpin for TargetPoint
impl UnsafeUnpin for TargetPoint
impl UnwindSafe for TargetPoint
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.