glBegin(tipo_primitiva) // tipo_primitiva puede ser GL_TRIANGLES, GL_POINTS, GL_LINES, GL_LINE_STRIP, GL_LINE_LOOP
// Escribir sucesión de atributos del vértice + vértice. Ejemplo:
glColor3f(r1, g1, b1); glNormal(xn1, yn1, zn1); glTexCoord2f(u1, v1); glVertex3f(x1, y1, z1);
// glColor3f(), glNormal(), glTexCoord2f() pueden ser omitidos.
...
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Programa clave: Restic - backups done right!.
- Inicializa el repositorio. No pierdas la contraseña.
restic init --repo repositorio
This file contains 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::{fmt::Debug, io, str::FromStr}; | |
// ─── Helper Functions ──────────────────────────────────────────────────────── | |
/// Calculates the euclidean distance between the two bodies. | |
/// Given our assumptions, we don't need to be so rigorous with the distance formula | |
fn distance(a: &CelestialBody, b: &CelestialBody) -> f32 { | |
let x = a.position.0 - b.position.0; | |
let y = a.position.1 - b.position.1; | |
(x.powi(2) + y.powi(2)).sqrt() |