Skip to content

Instantly share code, notes, and snippets.

@sug0
sug0 / sin.rs
Last active February 16, 2022 09:57
Constant function sin table in Rust
#![feature(const_fn)]
#![feature(const_raw_ptr_deref)]
fn main() {
const SIN_90: f32 = SINTAB[90];
println!("{}", SIN_90);
}
const fn to_radians(x: f64) -> f64 {
x * (std::f64::consts::PI / 180.0)
; The official HD AI
; An Artificial Intelligence Script written by Archon and Promiskuitiv
; Get in contact with Promiskuitiv by sending a mail to [email protected]
; List of taunts it reacts to:
; Standard taunts.
; 33 - Stop slinging resources. If slinging is requested early and is immediately canceled it may mess up the strategy.
; 38 - Sling Resources. Human player only, stops any unit production except for civilian units.