Remove Assembly.
[SquirrelJME.git] / modules / cldc-compact / src / main / java / cc / squirreljme / jvm / mle / MathShelf.java
blobeab65228b9eeb06ace38edc471ab00c91a5d38d3
1 // -*- Mode: Java; indent-tabs-mode: t; tab-width: 4 -*-
2 // ---------------------------------------------------------------------------
3 // SquirrelJME
4 // Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
5 // ---------------------------------------------------------------------------
6 // SquirrelJME is under the GNU General Public License v3+, or later.
7 // See license.mkd for licensing and copyright information.
8 // ---------------------------------------------------------------------------
10 package cc.squirreljme.jvm.mle;
12 import cc.squirreljme.runtime.cldc.annotation.SquirrelJMEVendorApi;
14 /**
15 * This contains various math functions.
17 * @since 2020/06/18
19 @SquirrelJMEVendorApi
20 public final class MathShelf
22 /**
23 * Not used.
25 * @since 2020/06/18
27 private MathShelf()
31 /**
32 * Packs the given two integers to a double value.
34 * @param __lo The low value.
35 * @param __hi The high value.
36 * @return The double value.
37 * @since 2019/06/21
39 public static native double doublePack(int __lo, int __hi);
41 /**
42 * Unpacks the high value of a double.
44 * @param __d The double to unpack.
45 * @return The unpacked high value.
46 * @since 2020/02/24
48 public static native int doubleUnpackHigh(double __d);
50 /**
51 * Unpacks the low value of a double.
53 * @param __d The double to unpack.
54 * @return The unpacked low value.
55 * @since 2020/02/24
57 public static native int doubleUnpackLow(double __d);
59 /**
60 * Packs the given two integers to a long value.
62 * @param __lo The low value.
63 * @param __hi The high value.
64 * @return The long value.
65 * @since 2019/06/21
67 public static native long longPack(int __lo, int __hi);
69 /**
70 * Unpack high value from long.
72 * @param __v The long value.
73 * @return The unpacked fragment.
74 * @since 2019/06/21
76 public static native int longUnpackHigh(long __v);
78 /**
79 * Unpack low value from long.
81 * @param __v The long value.
82 * @return The unpacked fragment.
83 * @since 2019/06/21
85 public static native int longUnpackLow(long __v);
87 /**
88 * Extracts the raw bits of the given value.
90 * @param __v The value to extract.
91 * @return The raw bits.
92 * @since 2020/06/18
94 public static native long rawDoubleToLong(double __v);
96 /**
97 * Extracts the raw bits of the given value.
99 * @param __v The value to extract.
100 * @return The raw bits.
101 * @since 2020/06/18
103 public static native int rawFloatToInt(float __v);
106 * Composes the value from the given bits
108 * @param __b The raw bits.
109 * @return The value.
110 * @since 2020/06/18
112 public static native float rawIntToFloat(int __b);
115 * Composes the value from the given bits
117 * @param __b The raw bits.
118 * @return The value.
119 * @since 2020/06/18
121 public static native double rawLongToDouble(long __b);