Closed SkybuckFlying closed 1 year ago
i am sure you using some gcc garbage from the past... BLEH
Anyway setting C++17 language in visual studio wasn't enough...
apperently some shitty flag must be added too:
In Visual Studio need add flag /std:c++17 to Debug -> Project Properties -> C/C++ -> All options -> Additional Options – Elmir Dec 4, 2021 at 22:32
Not tried yet gonna try it... :PPPP***8
I HAVE BETTER THINGS TO DO THAN WASTE MY LIFE ON SETTING THESE KINDS OF STUPID MAKE AND OPTION GARBAGE THINGS BYEEEE.
APPERENTLY VISUAL STUDIO DOESN'T TAKE ME TO THE DEBUG OPTIONS WJHEN THE DEBUG BUILD IS SET...
IT TOOK ME TO RELEASE OPTIONS... THAT'S PROBABLY WHY IT DIDNT WORK...
A;PPERENTLY I MUST SET THE C++ LANGUAGE TO VERSION 17 IN RELEASE
AND AAAAGGGGAAAIN IN DEBUG....
WHO THE FUCK DEBUGS VERSION 14 AND THEN BUILDS IN VERSION 17 OR VICA VERSA IT DOESNT MAKE ANY FUCKING SENSE.. IAM SURE THERE IS USE CASE BUT STILL OHM MY FUCKING GOD
BYEEEE.
THIS IS PROBABLY ERRORS FROM THE MISSING ALGORITHM FILES:
1>E:\SourceCode\test optional garbage\ConsoleApplication1\vector3d.h(127,25): error C3861: 'essentiallyEqual': identifier not found 1>E:\SourceCode\test optional garbage\ConsoleApplication1\vector3d.h(221,25): error C3861: 'toRadians': identifier not found 1>E:\SourceCode\test optional garbage\ConsoleApplication1\vector3d.h(319,12): error C3861: 'essentiallyEqual': identifier not found 1>E:\SourceCode\test optional garbage\ConsoleApplication1\vector3d.h(320,6): error C3861: 'essentiallyEqual': identifier not found 1>E:\SourceCode\test optional garbage\ConsoleApplication1\vector3d.h(321,6): error C3861: 'essentiallyEqual': identifier not found
AAAAAAAAAAAAAAAAHHHHHHHHHHHHHHHHHHHHHHHHHHHBBBBBBBBBBBBBYYYYYYYEEEEEEEEEEEE
HAH I JUST NUKE IT AND DELETE THOSE GARBAGE FUNCTIONS DONT NEED EM... JUST NEED A LITTLE BIT TO NVECTOPR OR WHATEVER THE FUCK NEED ANGLE OH MTY GBYEEEE
I converted the necessary code to Delphi...
1>E:\SourceCode\test optional garbage\ConsoleApplication1\vector3d.h(39,10): fatal error C1083: Cannot open include file: 'algorithm.h': No such file or directory
IF REMOVED IT GUESS WORSE:
Build started... 1>------ Build started: Project: ConsoleApplication1, Configuration: Debug Win32 ------ 1>Build started 16-2-2023 5:28:55. 1>Target InitializeBuildStatus: 1> Touching "Debug\ConsoleA.5af436db.tlog\unsuccessfulbuild". 1>Target VcpkgTripletSelection: 1> Using triplet "x86-windows" from "E:\SourceCode\vcpkg\scripts\buildsystems\msbuild......\installed\x86-windows\" 1>Target ClCompile: 1> ConsoleApplication1.cpp 1> The contents of are available only with C++17 or later.
1> E:\SourceCode\test optional garbage\ConsoleApplication1\vector3d.h(201,48): error C2039: 'optional': is not a member of 'std'
1> C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\sstream(20): message : see declaration of 'std'
1> E:\SourceCode\test optional garbage\ConsoleApplication1\vector3d.h(201,56): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1> E:\SourceCode\test optional garbage\ConsoleApplication1\vector3d.h(201,56): error C2143: syntax error: missing ',' before '<'
1> E:\SourceCode\test optional garbage\ConsoleApplication1\vector3d.h(127,25): error C3861: 'essentiallyEqual': identifier not found
1> E:\SourceCode\test optional garbage\ConsoleApplication1\vector3d.h(206,21): error C2065: 'n': undeclared identifier
1> E:\SourceCode\test optional garbage\ConsoleApplication1\vector3d.h(206,31): error C2039: 'nullopt': is not a member of 'std'
1> C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\sstream(20): message : see declaration of 'std'
1> E:\SourceCode\test optional garbage\ConsoleApplication1\vector3d.h(206,1): error C2065: 'nullopt': undeclared identifier
1> E:\SourceCode\test optional garbage\ConsoleApplication1\vector3d.h(206,56): error C2065: 'n': undeclared identifier
1> E:\SourceCode\test optional garbage\ConsoleApplication1\vector3d.h(206,14): error C2737: 'sign': const object must be initialized
1> E:\SourceCode\test optional garbage\ConsoleApplication1\vector3d.h(221,25): error C3861: 'toRadians': identifier not found
1> E:\SourceCode\test optional garbage\ConsoleApplication1\vector3d.h(319,12): error C3861: 'essentiallyEqual': identifier not found
1> E:\SourceCode\test optional garbage\ConsoleApplication1\vector3d.h(320,6): error C3861: 'essentiallyEqual': identifier not found
1> E:\SourceCode\test optional garbage\ConsoleApplication1\vector3d.h(321,6): error C3861: 'essentiallyEqual': identifier not found
1>Done building target "ClCompile" in project "ConsoleApplication1.vcxproj" -- FAILED.
1>
1>Done building project "ConsoleApplication1.vcxproj" -- FAILED.
1>
1>Build FAILED.
1>
1>E:\SourceCode\test optional garbage\ConsoleApplication1\vector3d.h(201,48): error C2039: 'optional': is not a member of 'std'
1>E:\SourceCode\test optional garbage\ConsoleApplication1\vector3d.h(201,56): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>E:\SourceCode\test optional garbage\ConsoleApplication1\vector3d.h(201,56): error C2143: syntax error: missing ',' before '<'
1>E:\SourceCode\test optional garbage\ConsoleApplication1\vector3d.h(127,25): error C3861: 'essentiallyEqual': identifier not found
1>E:\SourceCode\test optional garbage\ConsoleApplication1\vector3d.h(206,21): error C2065: 'n': undeclared identifier
1>E:\SourceCode\test optional garbage\ConsoleApplication1\vector3d.h(206,31): error C2039: 'nullopt': is not a member of 'std'
1>E:\SourceCode\test optional garbage\ConsoleApplication1\vector3d.h(206,1): error C2065: 'nullopt': undeclared identifier
1>E:\SourceCode\test optional garbage\ConsoleApplication1\vector3d.h(206,56): error C2065: 'n': undeclared identifier
1>E:\SourceCode\test optional garbage\ConsoleApplication1\vector3d.h(206,14): error C2737: 'sign': const object must be initialized
1>E:\SourceCode\test optional garbage\ConsoleApplication1\vector3d.h(221,25): error C3861: 'toRadians': identifier not found
1>E:\SourceCode\test optional garbage\ConsoleApplication1\vector3d.h(319,12): error C3861: 'essentiallyEqual': identifier not found
1>E:\SourceCode\test optional garbage\ConsoleApplication1\vector3d.h(320,6): error C3861: 'essentiallyEqual': identifier not found
1>E:\SourceCode\test optional garbage\ConsoleApplication1\vector3d.h(321,6): error C3861: 'essentiallyEqual': identifier not found
1> 0 Warning(s)
1> 13 Error(s)
1>
1>Time Elapsed 00:00:01.72
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
THIS OPTIONAL THING IS FUCKING ANNOYING
double angleTo(const vector3d& v, const std::optional& n = std::nullopt) const
{
// q.v. stackoverflow.com/questions/14066933#answer-16544330, but n·p₁×p₂ is numerically
// ill-conditioned, so just calculate sign to apply to |p₁×p₂|
// if n·p₁×p₂ is -ve, negate |p₁×p₂|
// const int sign = n == std::nullopt || cross(v).dot(*n) >= 0 ? true : false;
}
DONT MAKE CODE UNNECESSARY COMPLEX !!!!