mirror of
https://github.com/Almamu/linux-wallpaperengine.git
synced 2025-09-14 13:56:48 +08:00

+ Re-structured some code to its (hopefully) final form (shader compiler, file finding, etc) Signed-off-by: Alexis Maiquez Murcia <almamu@almamu.com>
22 lines
655 B
C++
22 lines
655 B
C++
#include <irrlicht/fast_atof.h>
|
|
#include "core.h"
|
|
|
|
namespace wp
|
|
{
|
|
irr::core::vector3df core::ato3vf(const char *str)
|
|
{
|
|
irr::f32 x = irr::core::fast_atof (str, &str); while (*str == ' ') str ++;
|
|
irr::f32 y = irr::core::fast_atof (str, &str); while (*str == ' ') str ++;
|
|
irr::f32 z = irr::core::fast_atof (str, &str);
|
|
|
|
return irr::core::vector3df (x, y, z);
|
|
}
|
|
|
|
irr::core::vector2df core::ato2vf (const char *str)
|
|
{
|
|
irr::f32 x = irr::core::fast_atof (str, &str); while (*str == ' ') str ++;
|
|
irr::f32 y = irr::core::fast_atof (str, &str);
|
|
|
|
return irr::core::vector2df (x, y);
|
|
}
|
|
} |