This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 言語インストールスクリプト | |
# | |
# 言語をインストールするためのスクリプトをTOML形式で記述していただきます | |
# 各キー/値ごとにコメントで | |
# キー: キー名 | |
# 型: そのキーに対する値の型 | |
# 要否: そのキーが必須であるか任意であるか | |
# 説明: そのキーの説明 | |
# 例: そのキーの値として指定するものの例 | |
# が記述してあるので、 必須 の項目については必ず記述してください |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Simple FPS watchcer | |
#[derive(Debug, Clone, Default)] | |
pub struct Fps { | |
/// Average duration per frame in seconds | |
avg: f64, | |
/// Square of spike FPS in seconds | |
spike: f64, | |
} | |
impl Fps { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! | |
Cheat the borrow checker using raw pointer | |
*/ | |
pub fn cheat<T>(x: &T) -> Cheat<T> { | |
unsafe { Cheat::new(x) } | |
} | |
/// Lifetime-free mutable reference to type `T` | |
/// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::{ | |
env, | |
fmt::Write as _, | |
fs::{self, File}, | |
io::prelude::*, | |
path::{Path, PathBuf}, | |
}; | |
use convert_case::{Case, Casing}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//! Field of view for orthogonal grid maps | |
// pub struct Vec2i { x: i32, y: i32 } | |
// impl Vec2i { | |
// pub fn new(x: i32, y: i32) -> Self { Self { x, y } } | |
// pub fn len_king(&self) -> u32 { std::cmp::max(self.x, self.y) } | |
// } | |
use crate::utils::grid2d::Vec2i; | |
/// Refreshes FoV data or maybe bundle of FoV and FoW |