# HalfKt

Added in 1.1.0

*** ** * ** ***


```
public final class HalfKt
```

<br />

*** ** * ** ***

## Summary

| ### Public methods |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/util/Half.html` | `@https://developer.android.com/reference/androidx/annotation/RequiresApi(value = 26) https://developer.android.com/reference/androidx/core/util/HalfKt#(kotlin.Double).toHalf()(double receiver)` Returns a `https://developer.android.com/reference/android/util/Half.html` instance representing given `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html`. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/util/Half.html` | `@https://developer.android.com/reference/androidx/annotation/RequiresApi(value = 26) https://developer.android.com/reference/androidx/core/util/HalfKt#(kotlin.Float).toHalf()(float receiver)` Returns a `https://developer.android.com/reference/android/util/Half.html` instance representing given `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html`. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/util/Half.html` | `@https://developer.android.com/reference/androidx/annotation/RequiresApi(value = 26) https://developer.android.com/reference/androidx/core/util/HalfKt#(kotlin.Short).toHalf()(@https://developer.android.com/reference/androidx/annotation/HalfFloat short receiver)` Returns a `https://developer.android.com/reference/android/util/Half.html` instance representing given `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-short/index.html`. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/util/Half.html` | `@https://developer.android.com/reference/androidx/annotation/RequiresApi(value = 26) https://developer.android.com/reference/androidx/core/util/HalfKt#(kotlin.String).toHalf()(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html receiver)` Returns a `https://developer.android.com/reference/android/util/Half.html` instance representing given `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html`. |

## Public methods

### toHalf

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/util/Half.kt+function:toHalf) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
@RequiresApi(value = 26)
public static final @NonNull Half toHalf(double receiver)
```

Returns a `https://developer.android.com/reference/android/util/Half.html` instance representing given `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html`.

| See also |
|---|---|
| `https://developer.android.com/reference/android/util/Half.html#valueOf(float)` |   |

### toHalf

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/util/Half.kt+function:toHalf) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
@RequiresApi(value = 26)
public static final @NonNull Half toHalf(float receiver)
```

Returns a `https://developer.android.com/reference/android/util/Half.html` instance representing given `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html`.

| See also |
|---|---|
| `https://developer.android.com/reference/android/util/Half.html#valueOf(float)` |   |

### toHalf

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/util/Half.kt+function:toHalf) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
@RequiresApi(value = 26)
public static final @NonNull Half toHalf(@HalfFloat short receiver)
```

Returns a `https://developer.android.com/reference/android/util/Half.html` instance representing given `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-short/index.html`.

| See also |
|---|---|
| `https://developer.android.com/reference/android/util/Half.html#valueOf(float)` |   |

### toHalf

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/util/Half.kt+function:toHalf) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
@RequiresApi(value = 26)
public static final @NonNull Half toHalf(@NonNull String receiver)
```

Returns a `https://developer.android.com/reference/android/util/Half.html` instance representing given `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html`.

| See also |
|---|---|
| `https://developer.android.com/reference/android/util/Half.html#valueOf(float)` |   |