All Downloads are FREE. Search and download functionalities are using the official Maven repository.

system.MathF Maven / Gradle / Ivy

/*
 *  MIT License
 *
 *  Copyright (c) 2024 MASES s.r.l.
 *
 *  Permission is hereby granted, free of charge, to any person obtaining a copy
 *  of this software and associated documentation files (the "Software"), to deal
 *  in the Software without restriction, including without limitation the rights
 *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 *  copies of the Software, and to permit persons to whom the Software is
 *  furnished to do so, subject to the following conditions:
 *
 *  The above copyright notice and this permission notice shall be included in all
 *  copies or substantial portions of the Software.
 *
 *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 *  SOFTWARE.
 */

/**************************************************************************************
 * 
 *      This code was generated from a template using JCOReflector v. 1.15.0.0
 * 
 *      Manual changes to this file may cause unexpected behavior in your application.
 *      Manual changes to this file will be overwritten if the code is regenerated.
 * 
 *************************************************************************************/

package system;

import org.mases.jcobridge.*;
import org.mases.jcobridge.netreflection.*;
import java.util.ArrayList;

// Import section
import system.Single;
import system.MidpointRounding;


/**
 * The base .NET class managing System.MathF, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e.
 * 

* * .NET documentation at https://docs.microsoft.com/en-us/dotnet/api/System.MathF *

* * Powered by JCOBridge: more info at https://www.jcobridge.com * * @author MASES s.r.l https://masesgroup.com * @version 1.15.0.0 */ public class MathF extends NetObject { /** * Fully assembly qualified name: System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e */ public static final String assemblyFullName = "System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e"; /** * Assembly name: System.Private.CoreLib */ public static final String assemblyShortName = "System.Private.CoreLib"; /** * Qualified class name: System.MathF */ public static final String className = "System.MathF"; static JCOBridge bridge = JCOBridgeInstance.getInstance(assemblyFullName); /** * The type managed from JCOBridge. See {@link JCType} */ public static JCType classType = createType(); static JCEnum enumInstance = null; JCObject classInstance = null; static JCType createType() { try { String classToCreate = className + ", " + (JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName); if (JCOReflector.getDebug()) JCOReflector.writeLog("Creating %s", classToCreate); JCType typeCreated = bridge.GetType(classToCreate); if (JCOReflector.getDebug()) JCOReflector.writeLog("Created: %s", (typeCreated != null) ? typeCreated.toString() : "Returned null value"); return typeCreated; } catch (JCException e) { JCOReflector.writeLog(e); return null; } } void addReference(String ref) throws Throwable { try { bridge.AddReference(ref); } catch (JCNativeException jcne) { throw translateException(jcne); } } /** * Internal constructor. Use with caution */ public MathF(java.lang.Object instance) throws Throwable { super(instance); if (instance instanceof JCObject) { classInstance = (JCObject) instance; } else throw new Exception("Cannot manage object, it is not a JCObject"); } public String getJCOAssemblyName() { return assemblyFullName; } public String getJCOClassName() { return className; } public String getJCOObjectName() { return className + ", " + (JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName); } public java.lang.Object getJCOInstance() { return classInstance; } public void setJCOInstance(JCObject instance) { classInstance = instance; super.setJCOInstance(classInstance); } public JCType getJCOType() { return classType; } /** * Try to cast the {@link IJCOBridgeReflected} instance into {@link MathF}, a cast assert is made to check if types are compatible. * @param from {@link IJCOBridgeReflected} instance to be casted * @return {@link MathF} instance * @throws java.lang.Throwable in case of error during cast operation */ public static MathF cast(IJCOBridgeReflected from) throws Throwable { NetType.AssertCast(classType, from); return new MathF(from.getJCOInstance()); } // Constructors section public MathF() throws Throwable { } // Methods section public static int ILogB(Single x) throws Throwable, system.NotSupportedException, system.ArgumentException, system.PlatformNotSupportedException, system.IndexOutOfRangeException, system.ArgumentOutOfRangeException, system.FormatException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { return (int)classType.Invoke("ILogB", x == null ? null : x.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static int Sign(Single x) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.PlatformNotSupportedException, system.ArrayTypeMismatchException, system.NotSupportedException, system.globalization.CultureNotFoundException, system.ObjectDisposedException, system.ArithmeticException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { return (int)classType.Invoke("Sign", x == null ? null : x.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Single Abs(Single x) throws Throwable, system.NotSupportedException, system.ArgumentException, system.PlatformNotSupportedException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objAbs = (JCObject)classType.Invoke("Abs", x == null ? null : x.getJCOInstance()); return new Single(objAbs); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Single Acos(Single x) throws Throwable { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objAcos = (JCObject)classType.Invoke("Acos", x == null ? null : x.getJCOInstance()); return new Single(objAcos); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Single Acosh(Single x) throws Throwable { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objAcosh = (JCObject)classType.Invoke("Acosh", x == null ? null : x.getJCOInstance()); return new Single(objAcosh); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Single Asin(Single x) throws Throwable { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objAsin = (JCObject)classType.Invoke("Asin", x == null ? null : x.getJCOInstance()); return new Single(objAsin); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Single Asinh(Single x) throws Throwable { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objAsinh = (JCObject)classType.Invoke("Asinh", x == null ? null : x.getJCOInstance()); return new Single(objAsinh); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Single Atan(Single x) throws Throwable { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objAtan = (JCObject)classType.Invoke("Atan", x == null ? null : x.getJCOInstance()); return new Single(objAtan); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Single Atan2(Single y, Single x) throws Throwable { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objAtan2 = (JCObject)classType.Invoke("Atan2", y == null ? null : y.getJCOInstance(), x == null ? null : x.getJCOInstance()); return new Single(objAtan2); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Single Atanh(Single x) throws Throwable { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objAtanh = (JCObject)classType.Invoke("Atanh", x == null ? null : x.getJCOInstance()); return new Single(objAtanh); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Single BitDecrement(Single x) throws Throwable, system.ArgumentException, system.NotSupportedException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.PlatformNotSupportedException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objBitDecrement = (JCObject)classType.Invoke("BitDecrement", x == null ? null : x.getJCOInstance()); return new Single(objBitDecrement); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Single BitIncrement(Single x) throws Throwable, system.ArgumentException, system.NotSupportedException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.PlatformNotSupportedException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objBitIncrement = (JCObject)classType.Invoke("BitIncrement", x == null ? null : x.getJCOInstance()); return new Single(objBitIncrement); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Single Cbrt(Single x) throws Throwable { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objCbrt = (JCObject)classType.Invoke("Cbrt", x == null ? null : x.getJCOInstance()); return new Single(objCbrt); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Single Ceiling(Single x) throws Throwable { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objCeiling = (JCObject)classType.Invoke("Ceiling", x == null ? null : x.getJCOInstance()); return new Single(objCeiling); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Single CopySign(Single x, Single y) throws Throwable, system.NotSupportedException, system.ArgumentException, system.PlatformNotSupportedException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objCopySign = (JCObject)classType.Invoke("CopySign", x == null ? null : x.getJCOInstance(), y == null ? null : y.getJCOInstance()); return new Single(objCopySign); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Single Cos(Single x) throws Throwable { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objCos = (JCObject)classType.Invoke("Cos", x == null ? null : x.getJCOInstance()); return new Single(objCos); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Single Cosh(Single x) throws Throwable { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objCosh = (JCObject)classType.Invoke("Cosh", x == null ? null : x.getJCOInstance()); return new Single(objCosh); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Single Exp(Single x) throws Throwable { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objExp = (JCObject)classType.Invoke("Exp", x == null ? null : x.getJCOInstance()); return new Single(objExp); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Single Floor(Single x) throws Throwable { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objFloor = (JCObject)classType.Invoke("Floor", x == null ? null : x.getJCOInstance()); return new Single(objFloor); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Single FusedMultiplyAdd(Single x, Single y, Single z) throws Throwable { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objFusedMultiplyAdd = (JCObject)classType.Invoke("FusedMultiplyAdd", x == null ? null : x.getJCOInstance(), y == null ? null : y.getJCOInstance(), z == null ? null : z.getJCOInstance()); return new Single(objFusedMultiplyAdd); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Single IEEERemainder(Single x, Single y) throws Throwable, system.NotSupportedException, system.ArgumentException, system.PlatformNotSupportedException, system.ArithmeticException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objIEEERemainder = (JCObject)classType.Invoke("IEEERemainder", x == null ? null : x.getJCOInstance(), y == null ? null : y.getJCOInstance()); return new Single(objIEEERemainder); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Single Log(Single x, Single y) throws Throwable { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objLog = (JCObject)classType.Invoke("Log", x == null ? null : x.getJCOInstance(), y == null ? null : y.getJCOInstance()); return new Single(objLog); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Single Log(Single x) throws Throwable { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objLog = (JCObject)classType.Invoke("Log", x == null ? null : x.getJCOInstance()); return new Single(objLog); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Single Log10(Single x) throws Throwable { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objLog10 = (JCObject)classType.Invoke("Log10", x == null ? null : x.getJCOInstance()); return new Single(objLog10); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Single Log2(Single x) throws Throwable { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objLog2 = (JCObject)classType.Invoke("Log2", x == null ? null : x.getJCOInstance()); return new Single(objLog2); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Single Max(Single x, Single y) throws Throwable, system.NotSupportedException, system.PlatformNotSupportedException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objMax = (JCObject)classType.Invoke("Max", x == null ? null : x.getJCOInstance(), y == null ? null : y.getJCOInstance()); return new Single(objMax); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Single MaxMagnitude(Single x, Single y) throws Throwable, system.NotSupportedException, system.PlatformNotSupportedException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objMaxMagnitude = (JCObject)classType.Invoke("MaxMagnitude", x == null ? null : x.getJCOInstance(), y == null ? null : y.getJCOInstance()); return new Single(objMaxMagnitude); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Single Min(Single x, Single y) throws Throwable, system.NotSupportedException, system.PlatformNotSupportedException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objMin = (JCObject)classType.Invoke("Min", x == null ? null : x.getJCOInstance(), y == null ? null : y.getJCOInstance()); return new Single(objMin); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Single MinMagnitude(Single x, Single y) throws Throwable, system.NotSupportedException, system.PlatformNotSupportedException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objMinMagnitude = (JCObject)classType.Invoke("MinMagnitude", x == null ? null : x.getJCOInstance(), y == null ? null : y.getJCOInstance()); return new Single(objMinMagnitude); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Single Pow(Single x, Single y) throws Throwable { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objPow = (JCObject)classType.Invoke("Pow", x == null ? null : x.getJCOInstance(), y == null ? null : y.getJCOInstance()); return new Single(objPow); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Single ReciprocalEstimate(Single x) throws Throwable { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objReciprocalEstimate = (JCObject)classType.Invoke("ReciprocalEstimate", x == null ? null : x.getJCOInstance()); return new Single(objReciprocalEstimate); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Single ReciprocalSqrtEstimate(Single x) throws Throwable { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objReciprocalSqrtEstimate = (JCObject)classType.Invoke("ReciprocalSqrtEstimate", x == null ? null : x.getJCOInstance()); return new Single(objReciprocalSqrtEstimate); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Single Round(Single x, int digits, MidpointRounding mode) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.PlatformNotSupportedException, system.ArrayTypeMismatchException, system.NotSupportedException, system.globalization.CultureNotFoundException, system.ObjectDisposedException, system.IndexOutOfRangeException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objRound = (JCObject)classType.Invoke("Round", x == null ? null : x.getJCOInstance(), digits, mode == null ? null : mode.getJCOInstance()); return new Single(objRound); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Single Round(Single x, int digits) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.PlatformNotSupportedException, system.ArrayTypeMismatchException, system.NotSupportedException, system.ObjectDisposedException, system.RankException, system.IndexOutOfRangeException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objRound = (JCObject)classType.Invoke("Round", x == null ? null : x.getJCOInstance(), digits); return new Single(objRound); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Single Round(Single x, MidpointRounding mode) throws Throwable, system.NotSupportedException, system.PlatformNotSupportedException, system.IndexOutOfRangeException, system.ArgumentException, system.ArgumentOutOfRangeException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objRound = (JCObject)classType.Invoke("Round", x == null ? null : x.getJCOInstance(), mode == null ? null : mode.getJCOInstance()); return new Single(objRound); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Single Round(Single x) throws Throwable, system.NotSupportedException, system.PlatformNotSupportedException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objRound = (JCObject)classType.Invoke("Round", x == null ? null : x.getJCOInstance()); return new Single(objRound); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Single ScaleB(Single x, int n) throws Throwable, system.ArgumentException, system.NotSupportedException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.PlatformNotSupportedException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objScaleB = (JCObject)classType.Invoke("ScaleB", x == null ? null : x.getJCOInstance(), n); return new Single(objScaleB); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Single Sin(Single x) throws Throwable { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objSin = (JCObject)classType.Invoke("Sin", x == null ? null : x.getJCOInstance()); return new Single(objSin); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Single Sinh(Single x) throws Throwable { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objSinh = (JCObject)classType.Invoke("Sinh", x == null ? null : x.getJCOInstance()); return new Single(objSinh); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Single Sqrt(Single x) throws Throwable { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objSqrt = (JCObject)classType.Invoke("Sqrt", x == null ? null : x.getJCOInstance()); return new Single(objSqrt); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Single Tan(Single x) throws Throwable { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objTan = (JCObject)classType.Invoke("Tan", x == null ? null : x.getJCOInstance()); return new Single(objTan); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Single Tanh(Single x) throws Throwable { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objTanh = (JCObject)classType.Invoke("Tanh", x == null ? null : x.getJCOInstance()); return new Single(objTanh); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Single Truncate(Single x) throws Throwable { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objTruncate = (JCObject)classType.Invoke("Truncate", x == null ? null : x.getJCOInstance()); return new Single(objTruncate); } catch (JCNativeException jcne) { throw translateException(jcne); } } // Properties section // Instance Events section }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy