Removed unused functions

This commit is contained in:
nik012003
2023-07-24 15:01:16 +02:00
parent 6b4511bdd6
commit f90f737fb6
5 changed files with 16 additions and 30 deletions

View File

@@ -214,8 +214,7 @@ impl RootHandler for App {
.set_transform(Some(&root), Transform::identity())
.unwrap(); return};
let distance = Vec3::from(distance).length_squared();
dbg!(distance.sqrt());
dbg!(ACTIVATION_DISTANCE);
if distance > ACTIVATION_DISTANCE.powi(2) {
let _ = application.launch(&space);
}

View File

@@ -1,5 +1,5 @@
use color_eyre::eyre::Result;
use glam::Quat;
use glam::{Quat, Vec3};
use manifest_dir_macros::directory_relative_path;
use mint::Vector3;
use protostar::{
@@ -437,10 +437,9 @@ impl RootHandler for App {
//TODO: split the executable string for the args
tokio::task::spawn(async move {
let distance_vector = distance_future.await.ok().unwrap().0;
let distance = ((distance_vector.x.powi(2) + distance_vector.y.powi(2)).sqrt()
+ distance_vector.z.powi(2))
.sqrt();
if dbg!(distance) > ACTIVATION_DISTANCE {
let distance = Vec3::from(distance_vector).length_squared();
if distance > ACTIVATION_DISTANCE {
let _ = application.launch(&space);
}
});

View File

@@ -1,6 +1,6 @@
use clap::{self, Parser};
use color_eyre::eyre::Result;
use glam::Quat;
use glam::{Quat, Vec3};
use manifest_dir_macros::directory_relative_path;
use mint::Vector3;
use protostar::{
@@ -416,10 +416,9 @@ impl RootHandler for App {
//TODO: split the executable string for the args
tokio::task::spawn(async move {
let distance_vector = distance_future.await.ok().unwrap().0;
let distance = ((distance_vector.x.powi(2) + distance_vector.y.powi(2)).sqrt()
+ distance_vector.z.powi(2))
.sqrt();
if dbg!(distance) > ACTIVATION_DISTANCE {
let distance = Vec3::from(distance_vector).length_squared();
if distance > ACTIVATION_DISTANCE {
let _ = application.launch(&space);
}
});