<commit_before>//! This module provides casting iterators for certain types of accessors.

/// Casting iterator and accompanying types for `Colors`.
pub mod colors;
/// Casting iterator and accompanying types for `Indices`.
pub mod indices;
/// Casting iterator and accompanying types for `Joints`.
pub mod joints;
/// Casting iterator and accompanying types for `TexCoords`.
pub mod tex_coords;
/// Casting iterator and accompanying types for `Weights`.
pub mod weights;
/// Casting iterator and accompanying types for `MorphWeights`.
pub mod morph_weights;
/// Casting iterator and accompanying types for `Rotations`.
pub mod rotations;

fn norm_i8_as_f32(x: i8) -> f32 {
    (x as f32 * (1.0 / i8::max_value() as f32)).max(-1.0)
}

fn norm_u8_as_u16(x: u8) -> u16 {
    x as u16 * 0x100
}

fn norm_u8_as_f32(x: u8) -> f32 {
    x as f32 * (1.0 / u8::max_value() as f32)
}

fn norm_i16_as_f32(x: i16) -> f32 {
    (x as f32 * (1.0 / i16::max_value() as f32)).max(-1.0)
}

fn norm_u16_as_u8(x: u16) -> u8 {
    (x / 0x100) as u8
}

fn norm_u16_as_f32(x: u16) -> f32 {
    x as f32 * (1.0 / u16::max_value() as f32)
}

fn norm_f32_as_u8(x: f32) -> u8 {
    (x * u8::max_value() as f32) as u8
}

fn norm_f32_as_u16(x: f32) -> u16 {
    (x * u16::max_value() as f32) as u16
}<commit_msg>#[inline(always)] for internal conversion functions.<commit_after>//! This module provides casting iterators for certain types of accessors.

/// Casting iterator and accompanying types for `Colors`.
pub mod colors;
/// Casting iterator and accompanying types for `Indices`.
pub mod indices;
/// Casting iterator and accompanying types for `Joints`.
pub mod joints;
/// Casting iterator and accompanying types for `TexCoords`.
pub mod tex_coords;
/// Casting iterator and accompanying types for `Weights`.
pub mod weights;
/// Casting iterator and accompanying types for `MorphWeights`.
pub mod morph_weights;
/// Casting iterator and accompanying types for `Rotations`.
pub mod rotations;

#[inline(always)]
fn norm_i8_as_f32(x: i8) -> f32 {
    (x as f32 * (1.0 / i8::max_value() as f32)).max(-1.0)
}

#[inline(always)]
fn norm_u8_as_u16(x: u8) -> u16 {
    x as u16 * 0x100
}

#[inline(always)]
fn norm_u8_as_f32(x: u8) -> f32 {
    x as f32 * (1.0 / u8::max_value() as f32)
}

#[inline(always)]
fn norm_i16_as_f32(x: i16) -> f32 {
    (x as f32 * (1.0 / i16::max_value() as f32)).max(-1.0)
}

#[inline(always)]
fn norm_u16_as_u8(x: u16) -> u8 {
    (x / 0x100) as u8
}

#[inline(always)]
fn norm_u16_as_f32(x: u16) -> f32 {
    x as f32 * (1.0 / u16::max_value() as f32)
}

#[inline(always)]
fn norm_f32_as_u8(x: f32) -> u8 {
    (x * u8::max_value() as f32) as u8
}

#[inline(always)]
fn norm_f32_as_u16(x: f32) -> u16 {
    (x * u16::max_value() as f32) as u16
}
{'fraction_non_alphanumeric': 0.14747548129313476, 'fraction_numerical': 0.07918634217217581, 'mean_word_length': 3.5147540983606556, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7431573', 'n_tokens_mistral': 1177, 'n_tokens_neox': 1094, 'n_words': 334}