x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Blueprint does not have "double" type?

Hello,

so I was trying to have a pretty simple UFUNCTION which has a return type double where I suddenly realized that there is no "double" type in Blueprint?! Strangely enough my UFUNCTION got compiled and what I saw was a "bad_type" error in blueprint:

alt text

Is it by design that we don't have double type? I'm using the latest QA4.4 build.

Product Version: Not Selected
Tags:
bad_type.jpg (65.3 kB)
more ▼

asked Aug 27 '14 at 11:33 AM in C++ Programming

avatar image

Alex.Holyman
208 14 17 27

avatar image BrUnO XaVIeR Aug 27 '14 at 01:12 PM

Yep, some types can't be used as BP pins. You can't use doubles, delegates and some others. The BP will be constructed but will give compile errors if using those as pins.

avatar image skeleton60 May 22 '16 at 11:13 AM

Hello,

i am still learning to make game with ue4 editor and i see that i cant use uint64 or int64 variables :(

someone made a "wrapper" (https://github.com/Daekesh/KeshUE4FundamentalTypeWrapperPlugin/blob/master/Source/KeshUE4FundamentalTypeWrapperPlugin/Classes/KeshUE4FundamentalTypeWrapperPlugin/KeshUE4FundamentalTypeWrapper.h)

but i dont know if i can use this for my problem ? may i do variable1+variable2 = variable3 in blueprint with this wrapper with variable1 variable2 and variable3 as uint64 ? is there any tutorial how to use this in my project so i can use uint64? i am so lost right now since i only use blueprint only project :(

avatar image Tim C ♦♦ STAFF May 23 '16 at 08:19 PM

Hi skeleton60,

I took a real quick glance at the plugin that you linked, and it appears to be doing a lot of casting internally to allow the use of other data types that are not directly supported by Blueprints. While this may work fine, you should be aware that casting can potentially result in lost data or unexpected results. This is particularly dangerous in situations where you are casting from a larger data type (uint64, for example) to a smaller type (int32, which is supported by Blueprints). If the value stored in the uint64 variable is larger than the maximum value that can be stored in an int32 variable, you will run into problems with integer overflow.

If you are new to game development and using Blueprints only, it may be best to just use the data types that are supported by Blueprints by default. This will remove the need to understand the plugin you mentioned, and should reduce any confusion that you may have.

Tim

avatar image Wink_00 Sep 08 '16 at 11:36 PM
  • for double

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

3 answers: sort voted first

Hi Alex,

Doubles are currently not usable in Blueprints. This is mainly done to simplify Blueprint use for non-programmers. There is some discussion going on internally in regards to exposing doubles to Blueprints, but I do not know when, or even if, this will happen.

more ▼

answered Aug 27 '14 at 03:10 PM

avatar image Alex.Holyman Aug 27 '14 at 03:42 PM

Hi Tim,

thanks for fast response. It is rather confusing not to have a basic type in BP and I still don't quit understand how is float less confusing for non-programmers than double. But I guess we will have to use float for now.

avatar image gmpreussner STAFF Aug 27 '14 at 03:47 PM

The main goal was to expose only a single type for each kind of numeric value. That we chose float instead of double and int32 instead of, say, int64 is purely historical, because in UnrealScript in earlier versions of Unreal Engine, those larger types were not available at all.

We are increasingly seeing the disadvantages of this and are seriously considering to update all fundamental BP types to the largest available types, i.e. double and int64. Some more discussion is needed as the impact of this change would be rather large.

avatar image bporter Apr 20 '16 at 03:58 PM
  • for double (and double*) in Blueprints.

avatar image somethingstarted Feb 28 '19 at 11:05 AM

any news on doubles? Can yall just write the new blueprints to mirror the latest version of cpp as far as variable types? they could be a way to have ultra precision or loosely truncated, but faster calculations.

but i guess it would only be great if there was a way to do it without having to rework current game-code.

avatar image Kaleh Apr 27 '16 at 11:29 PM

bump for double because the float error is so annoying

avatar image Tim C ♦♦ STAFF Apr 30 '16 at 05:20 PM

We are still considering the option of using the larger data types (double, int64) in Blueprints. Unfortunately this would be a very large change within the Engine, and we do not have a timeframe on when we may attempt to make this change.

Tim

avatar image mrooney Jul 08 '16 at 09:19 PM

Sorry to bump an old post, but another good reason for this feature is that a lot of third party libraries use other numeric types, and it makes it impossible to define data for those things in blueprints. With double support you'd be able to store the entire range of values for all 32 bit number types despite the type difference.

That said something that might be nice and keep blueprints simple is to support extra numeric blueprint types, but only if they're defined in C++. That way people who use blueprint only won't ever need to know about it. What I really need more than anything is just to have types supported in blueprints as editable fields, but pins and members defined from blueprint aren't really important as I'm passing them to third party libraries in C++ anyway.

Just wanted to add to the voices that would support this feature :)

avatar image Tim C ♦♦ STAFF Jul 18 '16 at 09:09 PM

Hi mrooney,

There are some definite benefits that we can see to supporting Doubles in UE4, and there are a handful of Engineers here who are pushing for us to support them. Unfortunately Floats have been an integral part of the Engine for so long that there is a vast amount of inertia that must be overcome in order to start making the change. Floats are used literally everywhere in Blueprint code, and adding support for Doubles would either require vast areas of source code to be updated, or any function using a Float would need to be overloaded with a version using a Double instead. In addition, any projects started prior to the change would need to be reworked if they wanted to use Doubles instead of Floats. As beneficial as the change may be for everyone using the Engine, it is not a change that we would be able to make quickly, nor without a great deal of planning.

Tim

avatar image Pelangi Aug 14 '16 at 02:47 AM

Hi Tim, I want to add mrooney's suggestion. Instead of converting float to double and int32 to int64, why not just keep them they way it is in Blueprint, but change them when they are compiled? So people will still see float and integer types, but during compilation, the compiler will automatically convert them to 64-bit data types.

I believe there are thousands of game developers out there dying to get this feature working in UE. Especially knowing that every OS in the market soon will migrate fully to 64-bit system. Perhaps in the next 5 years or so, support for 32-bit numbers will diminish.

So instead of recoding everything in UE, just change the behavior of the compiler to treat every 32-bit data type into 64-bit data type.

Normally, iOS uses Objective-C and Android uses Java. Conceptually, UE uses C++ but can generate binary codes to support both iOS and Android. So technically, you guys can modify the behavior of the compiler to do this.

avatar image Shohei Aug 14 '16 at 05:54 AM

You are forgetting the implications of casting every int32 to int64. First, how are you going to feed a 64 bit number if the runtime value is limited to 32 bits? Second, you completely ruin memory optimizations and unnecessarily double your memory footprint. You mentioned iOS and Android but I think you forgot to consider that these devices don't have 8 gigs of RAM. Hell, you'll be lucky if you have more than 1GB.

There aren't really any benefits of adding uint32/64, double, and int64. Chances are if you know how and when to use those data types you likely need to be using C++ anyway (yes I realize the generalization of this statement).

avatar image Tim C ♦♦ STAFF Aug 30 '16 at 02:26 PM

Hi Pelangi,

As Shohei mentioned, there are some drawbacks to your suggestion that may not be immediately obvious. First, any conversions of data types from larger to smaller types runs the risk of data loss. Even if you are only simulating the appearance of an int32 variable when it is actually an int64 variable, when that variable gets passed into Engine functions it will need to be converted to an int32 in order to work since the variable types in the Engine would not have been changed.

There would also be an additional cost in terms of performance whenever a variable is passed into, or returned from, an Engine function as the conversion takes place.

Unfortunately there would not be a feasible way to have the compiler convert the data types during compile time. Doing so would require that the Engine be rebuilt every time a project is rebuilt, and trying to automatically change data types for a program as complex as the Engine would be incredibly risky. The only way to minimize the risk of data loss and performance cost would be to completely replace the variable types in the Engine source code.

Tim

avatar image F3NR1S Jun 09 '17 at 01:40 AM
 #define float double

:p I'm sure it will just work. :D

avatar image Vertex Soup Feb 03 '17 at 03:20 PM
  • for double support and move discussion to pipeline already! :D Way too much people are asking for them. While most of simple stuff can be done in floats for more delicate stuff (and there is plenty of) one just need to have that double. Please make it happen, pretty please :)

avatar image masterwigglestin Feb 10 '17 at 03:10 AM

bump for double

avatar image Oldsiren Jun 08 '17 at 06:00 PM
  • for Double variable type, this will definitely be helpful when trying to get exact values without floating point problems and is super important!

avatar image RajZoox Oct 11 '17 at 09:32 PM

For real time hard simulation, not having support for double is very disappointing.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

You can write your own.

UE4KitMathBPLibrary.h

 // Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
 
 #pragma once
 
 #include "Engine.h"
 #include "UE4KitMathBPLibrary.generated.h"
 
 /* 
 *    Function library class.
 *    Each function in it is expected to be static and represents blueprint node that can be called in any blueprint.
 *
 *    When declaring function you can define metadata for the node. Key function specifiers will be BlueprintPure and BlueprintCallable.
 *    BlueprintPure - means the function does not affect the owning object in any way and thus creates a node without Exec pins.
 *    BlueprintCallable - makes a function which can be executed in Blueprints - Thus it has Exec pins.
 *    DisplayName - full name of the node, shown when you mouse over the node and in the blueprint drop down menu.
 *                Its lets you name the node using characters not allowed in C++ function names.
 *    CompactNodeTitle - the word(s) that appear on the node.
 *    Keywords -    the list of keywords that helps you to find node when you search for it using Blueprint drop-down menu. 
 *                Good example is "Print String" node which you can find also by using keyword "log".
 *    Category -    the category your node will be under in the Blueprint drop-down menu.
 *
 *    For more info on custom blueprint nodes visit documentation:
 *    https://wiki.unrealengine.com/Custom_Blueprint_Node_Creation
 */
 UCLASS()
 class UUE4KitMathBPLibrary : public UBlueprintFunctionLibrary
 {
     GENERATED_UCLASS_BODY()
 
 private:
 
     static FString DoubleToString(double InDouble);
 
 public:
 
     /* Double Addition (A + B) */
     UFUNCTION(BlueprintPure, meta = (DisplayName = "double + double", CompactNodeTitle = "+", Keywords = "double + add plus", CommutativeAssociativeBinaryOperator = "true"), Category = "UE4Kit|Math|Double")
     static FString Add_DoubleDouble(const FString& A = "1.0", const FString& B = "1.0");
 
     /* Double Subtraction (A - B) */
     UFUNCTION(BlueprintPure, meta = (DisplayName = "double - double", CompactNodeTitle = "-", Keywords = "double - subtract minus"), Category = "UE4Kit|Math|Double")
     static FString Subtract_DoubleDouble(const FString& A="1.0", const FString& B = "1.0");
 
     /* Double Multiplication (A * B) */
     UFUNCTION(BlueprintPure, meta = (DisplayName = "Double * Double", CompactNodeTitle = "*", Keywords = "double * multiply", CommutativeAssociativeBinaryOperator = "true"), Category = "UE4Kit|Math|Double")
     static FString Multiply_DoubleDouble(const FString& A = "1.0", const FString& B = "1.0");
 
     /* Double Division (A / B) */
     UFUNCTION(BlueprintPure, meta = (DisplayName = "Double / Double", CompactNodeTitle = "/", Keywords = "double / divide division"), Category = "UE4Kit|Math|Double")
     static FString Divide_DoubleDouble(const FString& A = "1.0", const FString& B = "1.0");
 };


UE4KitMathBPLibrary.cpp

 // Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
 
 #include "UE4KitMathModule.h"
 #include "UE4KitMathBPLibrary.h"
 
 UUE4KitMathBPLibrary::UUE4KitMathBPLibrary(const FObjectInitializer& ObjectInitializer)
 : Super(ObjectInitializer)
 {
 
 }
 
 FString UUE4KitMathBPLibrary::DoubleToString(double InDouble)
 {
     // Avoids negative zero
     if (InDouble == 0)
     {
         InDouble = 0;
     }
 
     FString TempString;
     // First create the string
     TempString = FString::Printf(TEXT("%.8lf"), InDouble);
     const TArray< TCHAR >& Chars = TempString.GetCharArray();
     const TCHAR Zero = '0';
     const TCHAR Period = '.';
     int32 TrimIndex = 0;
     // Find the first non-zero char in the array
     for (int32 Index = Chars.Num() - 2; Index >= 2; --Index)
     {
         const TCHAR EachChar = Chars[Index];
         const TCHAR NextChar = Chars[Index - 1];
         if ((EachChar != Zero) || (NextChar == Period))
         {
             TrimIndex = Index;
             break;
         }
     }
     // If we changed something trim the string
     if (TrimIndex != 0)
     {
         TempString = TempString.Left(TrimIndex + 1);
     }
     return TempString;
 }
 
 FString UUE4KitMathBPLibrary::Add_DoubleDouble(const FString& A, const FString& B)
 {
     double A_double = FCString::Atod(*A);
     double B_double = FCString::Atod(*B);
     double C_double = A_double + B_double;
     return     UUE4KitMathBPLibrary::DoubleToString(C_double);
 }
 
 FString UUE4KitMathBPLibrary::Subtract_DoubleDouble(const FString& A, const FString& B)
 {
     double A_double = FCString::Atod(*A);
     double B_double = FCString::Atod(*B);
     double C_double = A_double - B_double;
     return     UUE4KitMathBPLibrary::DoubleToString(C_double);
 }
 
 FString UUE4KitMathBPLibrary::Multiply_DoubleDouble(const FString& A, const FString& B)
 {
     double A_double = FCString::Atod(*A);
     double B_double = FCString::Atod(*B);
     double C_double = A_double * B_double;
     return     UUE4KitMathBPLibrary::DoubleToString(C_double);
 }
 
 FString UUE4KitMathBPLibrary::Divide_DoubleDouble(const FString& A, const FString& B)
 {
     double A_double = FCString::Atod(*A);
     double B_double = FCString::Atod(*B);
     double C_double = A_double / B_double;
     return     UUE4KitMathBPLibrary::DoubleToString(C_double);
 }




more ▼

answered May 08 '17 at 08:02 AM

avatar image

YeHaike
0 4 5

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

I have been having a lot of issues working with the standard floats so I took a deeper dive in the engine after looking at these 2 files above and added a few functions that made it possible, or rather, easier to do higher level math with some amount of accuracy. If I add more of the standard functions I'll end up updating this, but I figured like I found this someone else will probably end up bashing his head on it. Might as well share and save you some time.

Udated for Trigonometry functions. Uses the original math library so there is still float conversion occrring for these, however I like it better then having the float to string conversion appearing in blueprint - and the results actually seem more accurate this far.

UE4KitMathBPLibrary.h

 // Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
 
 #pragma once
 
 #include "Engine.h"
 #include "UnrealMathUtility.h"
 #include "UE4KitMathBPLibrary.generated.h"
 
 /*
 *    Function library class.
 *    Each function in it is expected to be static and represents blueprint node that can be called in any blueprint.
 *
 *    When declaring function you can define metadata for the node. Key function specifiers will be BlueprintPure and BlueprintCallable.
 *    BlueprintPure - means the function does not affect the owning object in any way and thus creates a node without Exec pins.
 *    BlueprintCallable - makes a function which can be executed in Blueprints - Thus it has Exec pins.
 *    DisplayName - full name of the node, shown when you mouse over the node and in the blueprint drop down menu.
 *                Its lets you name the node using characters not allowed in C++ function names.
 *    CompactNodeTitle - the word(s) that appear on the node.
 *    Keywords -    the list of keywords that helps you to find node when you search for it using Blueprint drop-down menu.
 *                Good example is "Print String" node which you can find also by using keyword "log".
 *    Category -    the category your node will be under in the Blueprint drop-down menu.
 *
 *    For more info on custom blueprint nodes visit documentation:
 *    https://wiki.unrealengine.com/Custom_Blueprint_Node_Creation
 */
 UCLASS()
 class UUE4KitMathBPLibrary : public UBlueprintFunctionLibrary
 {
     GENERATED_UCLASS_BODY()
 
 private:
 
     static FString DoubleToString(double InDouble);
 
 public:
 
     /* Double Addition (A + B) */
     UFUNCTION(BlueprintPure, meta = (DisplayName = "double + double", CompactNodeTitle = "+", Keywords = "double + add plus", CommutativeAssociativeBinaryOperator = "true"), Category = "UE4Kit|Math|Double")
         static FString Add_DoubleDouble(const FString& A = "1.0", const FString& B = "1.0");
 
     /* Double Subtraction (A - B) */
     UFUNCTION(BlueprintPure, meta = (DisplayName = "double - double", CompactNodeTitle = "-", Keywords = "double - subtract minus"), Category = "UE4Kit|Math|Double")
         static FString Subtract_DoubleDouble(const FString& A = "1.0", const FString& B = "1.0");
 
     /* Double Multiplication (A * B) */
     UFUNCTION(BlueprintPure, meta = (DisplayName = "Double * Double", CompactNodeTitle = "*", Keywords = "double * multiply", CommutativeAssociativeBinaryOperator = "true"), Category = "UE4Kit|Math|Double")
         static FString Multiply_DoubleDouble(const FString& A = "1.0", const FString& B = "1.0");
 
     /* Double Division (A / B) */
     UFUNCTION(BlueprintPure, meta = (DisplayName = "Double / Double", CompactNodeTitle = "/", Keywords = "double / divide division"), Category = "UE4Kit|Math|Double")
         static FString Divide_DoubleDouble(const FString& A = "1.0", const FString& B = "1.0");
     
     /* Double Range (A / B) */
     UFUNCTION(BlueprintPure, meta = (DisplayName = "InRange (Double)", Min = "0.0", Max = "1.0"), Category = "UE4Kit|Math|Double")
         static bool InRange_DoubleDouble(const FString& Value = "1.0", const FString& Min = "0", const FString& Max = "1", bool InclusiveMin = true, bool InclusiveMax = true);
 
     /** Returns true if A is Less than B (A < B) */
     UFUNCTION(BlueprintPure, meta = (DisplayName = "Double < Double", CompactNodeTitle = "<", Keywords = "< less"), Category = "Math|Double")
         static bool Less_DoubleDouble(const FString& A = "0", const FString& B = "1.0");
 
     /** Returns true if A is greater than B (A > B) */
     UFUNCTION(BlueprintPure, meta = (DisplayName = "Double > Double", CompactNodeTitle = ">", Keywords = "> greater"), Category = "Math|Double")
         static bool Greater_DoubleDouble(const FString& A = "1.0", const FString& B = "0");
 
     /** Returns true if A is Less than or equal to B (A <= B) */
     UFUNCTION(BlueprintPure, meta = (DisplayName = "Double <= Double", CompactNodeTitle = "<=", Keywords = "<= less"), Category = "Math|Double")
         static bool LessEqual_DoubleDouble(const FString& A = "0", const FString& B = "1.0");
 
     /** Returns true if A is greater than or equal to B (A >= B) */
     UFUNCTION(BlueprintPure, meta = (DisplayName = "Double >= Double", CompactNodeTitle = ">=", Keywords = ">= greater"), Category = "Math|Double")
         static bool GreaterEqual_DoubleDouble(const FString& A = "1.0", const FString& B = "0");
 
     /** Returns true if A is exactly equal to B (A == B)*/
     UFUNCTION(BlueprintPure, meta = (DisplayName = "Equal (Double)", CompactNodeTitle = "==", Keywords = "== equal"), Category = "Math|Double")
         static bool EqualEqual_DoubleDouble(const FString& A = "1.0", const FString& B = "1.0");
 
     /** Returns true if A is nearly equal to B (|A - B| < ErrorTolerance) */
     UFUNCTION(BlueprintPure, meta = (DisplayName = "Nearly Equal (Double)", Keywords = "== equal"), Category = "Math|Double")
         static bool NearlyEqual_DoubleDouble(const FString& A = "1.0", const FString& B = "1.0", const FString& ErrorTolerance = ".001");
 
     /** Returns true if A does not equal B (A != B)*/
     UFUNCTION(BlueprintPure, meta = (DisplayName = "NotEqual (Double)", CompactNodeTitle = "!=", Keywords = "!= not equal"), Category = "Math|Double")
         static bool NotEqual_DoubleDouble(const FString& A = "1.0", const FString& B = "0");
 
 
 
 
     /** Returns the sin of A (expects Degrees)*/
     UFUNCTION(BlueprintPure, meta = (DisplayName = "Sin (Degrees) Double", CompactNodeTitle = "SINd", Keywords = "sine"), Category = "Math|Trig|Double")
         static FString DegSin_DoubleDouble(FString A);
 
     /** Returns the inverse sin (arcsin) of A (result is in Degrees) */
     UFUNCTION(BlueprintPure, meta = (DisplayName = "Asin (Degrees) Double", CompactNodeTitle = "ASINd", Keywords = "sine"), Category = "Math|Trig|Double")
         static FString DegAsin_DoubleDouble(FString A);
 
     /** Returns the cos of A (expects Degrees)*/
     UFUNCTION(BlueprintPure, meta = (DisplayName = "Cos (Degrees) Double", CompactNodeTitle = "COSd"), Category = "Math|Trig|Double")
         static FString DegCos_DoubleDouble(FString A);
 
     /** Returns the inverse cos (arccos) of A (result is in Degrees) */
     UFUNCTION(BlueprintPure, meta = (DisplayName = "Acos (Degrees) Double", CompactNodeTitle = "ACOSd"), Category = "Math|Trig|Double")
         static FString DegAcos_DoubleDouble(FString A);
 
     /** Returns the tan of A (expects Degrees)*/
     UFUNCTION(BlueprintPure, meta = (DisplayName = "Tan (Degrees) Double", CompactNodeTitle = "TANd"), Category = "Math|Trig|Double")
         static FString DegTan_DoubleDouble(FString A);
 
     /** Returns the inverse tan (atan) (result is in Degrees)*/
     UFUNCTION(BlueprintPure, meta = (DisplayName = "Atan (Degrees) Double"), Category = "Math|Trig|Double")
         static FString DegAtan_DoubleDouble(FString A);
 
     /** Returns the inverse tan (atan2) of A/B (result is in Degrees)*/
     UFUNCTION(BlueprintPure, meta = (DisplayName = "Atan2 (Degrees) Double"), Category = "Math|Trig|Double")
         static FString DegAtan2_DoubleDouble(FString A, FString B);
 
 
 };

UE4KitMathBPLibrary.cpp

 // Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
 
 #include "UE4KitMathBPLibrary.h"
 
 UUE4KitMathBPLibrary::UUE4KitMathBPLibrary(const FObjectInitializer& ObjectInitializer)
     : Super(ObjectInitializer)
 {
 
 }
 
 FString UUE4KitMathBPLibrary::DoubleToString(double InDouble)
 {
     // Avoids negative zero
     if (InDouble == 0)
     {
         InDouble = 0;
     }
 
     FString TempString;
     // First create the string
     TempString = FString::Printf(TEXT("%.8lf"), InDouble);
     const TArray< TCHAR >& Chars = TempString.GetCharArray();
     const TCHAR Zero = '0';
     const TCHAR Period = '.';
     int32 TrimIndex = 0;
     // Find the first non-zero char in the array
     for (int32 Index = Chars.Num() - 2; Index >= 2; --Index)
     {
         const TCHAR EachChar = Chars[Index];
         const TCHAR NextChar = Chars[Index - 1];
         if ((EachChar != Zero) || (NextChar == Period))
         {
             TrimIndex = Index;
             break;
         }
     }
     // If we changed something trim the string
     if (TrimIndex != 0)
     {
         TempString = TempString.Left(TrimIndex + 1);
     }
     return TempString;
 }
 
 FString UUE4KitMathBPLibrary::Add_DoubleDouble(const FString& A, const FString& B)
 {
     double A_double = FCString::Atod(*A);
     double B_double = FCString::Atod(*B);
     double C_double = A_double + B_double;
     return     UUE4KitMathBPLibrary::DoubleToString(C_double);
 }
 
 FString UUE4KitMathBPLibrary::Subtract_DoubleDouble(const FString& A, const FString& B)
 {
     double A_double = FCString::Atod(*A);
     double B_double = FCString::Atod(*B);
     double C_double = A_double - B_double;
     return     UUE4KitMathBPLibrary::DoubleToString(C_double);
 }
 
 FString UUE4KitMathBPLibrary::Multiply_DoubleDouble(const FString& A, const FString& B)
 {
     double A_double = FCString::Atod(*A);
     double B_double = FCString::Atod(*B);
     double C_double = A_double * B_double;
     return     UUE4KitMathBPLibrary::DoubleToString(C_double);
 }
 
 FString UUE4KitMathBPLibrary::Divide_DoubleDouble(const FString& A, const FString& B)
 {
     double A_double = FCString::Atod(*A);
     double B_double = FCString::Atod(*B);
     double C_double = A_double / B_double;
     return     UUE4KitMathBPLibrary::DoubleToString(C_double);
 }
 
 bool UUE4KitMathBPLibrary::InRange_DoubleDouble(const FString& Value, const FString& Min, const FString& Max, bool InclusiveMin, bool InclusiveMax)
 {
     double value = FCString::Atod(*Value);
     double min = FCString::Atod(*Min);
     double max = FCString::Atod(*Max);
     return ((InclusiveMin ? (value >= min) : (value > min)) && (InclusiveMax ? (value <= max) : (value < max)));
 }
 
 bool UUE4KitMathBPLibrary::Less_DoubleDouble(const FString& A, const FString& B)
 {
     return A < B;
 }
 
 bool UUE4KitMathBPLibrary::Greater_DoubleDouble(const FString& A, const FString& B)
 {
     return A > B;
 }
 
 bool UUE4KitMathBPLibrary::LessEqual_DoubleDouble(const FString& A, const FString& B)
 {
     return A <= B;
 }
 
 bool UUE4KitMathBPLibrary::GreaterEqual_DoubleDouble(const FString& A, const FString& B)
 {
     return A >= B;
 }
 
 bool UUE4KitMathBPLibrary::EqualEqual_DoubleDouble(const FString& A, const FString& B)
 {
     return A == B;
 }
 
 bool UUE4KitMathBPLibrary::NearlyEqual_DoubleDouble(const FString& A, const FString& B, const FString& ErrorTolerance)
 {
     double a = FCString::Atod(*A);
     double b = FCString::Atod(*B);
     double ET = FCString::Atod(*ErrorTolerance);
     return abs(a - b) <= ET;
 }
 
 bool UUE4KitMathBPLibrary::NotEqual_DoubleDouble(const FString& A, const FString& B)
 {
     return A != B;
 }
 
 
 
 
 
 FString UUE4KitMathBPLibrary::DegSin_DoubleDouble(FString A)
 {
     double a = FCString::Atod(*A);
     float b = FMath::Sin(PI / (180.f) * a);
     a = b;
     return UUE4KitMathBPLibrary::DoubleToString(a);
 }
 
 FString UUE4KitMathBPLibrary::DegAsin_DoubleDouble(FString A)
 {
     double a = FCString::Atod(*A);
     float b = (180.f) / PI * FMath::Asin(a);
     a = b;
     return UUE4KitMathBPLibrary::DoubleToString(a);
 }
 
 FString UUE4KitMathBPLibrary::DegCos_DoubleDouble(FString A)
 {
     double a = FCString::Atod(*A);
     float b = FMath::Cos(PI / (180.f) * a);
     a = b;
     return UUE4KitMathBPLibrary::DoubleToString(a);
 }
 
 FString UUE4KitMathBPLibrary::DegAcos_DoubleDouble(FString A)
 {
     double a = FCString::Atod(*A);
     float b = (180.f) / PI * FMath::Acos(a);
     a = b;
     return UUE4KitMathBPLibrary::DoubleToString(a);
 }
 
 FString UUE4KitMathBPLibrary::DegTan_DoubleDouble(FString A)
 {
     double a = FCString::Atod(*A);
     float b = FMath::Tan(PI / (180.f) * a);
     a = b;
     return UUE4KitMathBPLibrary::DoubleToString(a);
 }
 
 FString UUE4KitMathBPLibrary::DegAtan_DoubleDouble(FString A)
 {
     double a = FCString::Atod(*A);
     float b = (180.f) / PI * FMath::Atan(a);
     a = b;
     return UUE4KitMathBPLibrary::DoubleToString(a);
 }
 
 FString UUE4KitMathBPLibrary::DegAtan2_DoubleDouble(FString A, FString B)
 {
     double a = FCString::Atod(*A);
     double b = FCString::Atod(*B);
     float c = (180.f) / PI * FMath::Atan2(a, b);
     a = c;
     return UUE4KitMathBPLibrary::DoubleToString(a);
 }
 
more ▼

answered Apr 18 '19 at 07:57 AM

avatar image

MostHost LA
16 2 3

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question