# Float2

Added in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Deprecated in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# Float2

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/renderscript/Float2 "View this page in Java")  

```
open class Float2
```

|---|------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                             ||
| ↳ | [android.renderscript.Float2](https://developer.android.com/reference/kotlin/android/renderscript/Float2#) |

*** ** * ** ***

| **This class was deprecated in API level 31.**
|
| Renderscript has been deprecated in API level 31. Please refer to the[migration guide](https://developer.android.com/guide/topics/renderscript/migration-guide)for the proposed alternatives.

Vector version of the basic float type. Provides two float fields packed.

## Summary

|                                                                                                                                                 Public constructors                                                                                                                                                 ||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [Float2](https://developer.android.com/reference/kotlin/android/renderscript/Float2#Float2())`()` <br />                                                                                                                                                                                                         |
| [Float2](https://developer.android.com/reference/kotlin/android/renderscript/Float2#Float2(kotlin.Float,%20kotlin.Float))`(`x:` `[Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html)`, `y:` `[Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html)`)` <br /> |

|                                                                                      Properties                                                                                       ||
|--------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------|
| [Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html) | [x](https://developer.android.com/reference/kotlin/android/renderscript/Float2#x:kotlin.Float) <br /> |
| [Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html) | [y](https://developer.android.com/reference/kotlin/android/renderscript/Float2#y:kotlin.Float) <br /> |

## Public constructors

### Float2

Added in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
Float2()
```  

### Float2

Added in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
Float2(
    x: Float, 
    y: Float)
```

## Properties

### x

Added in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
var x: Float
```

**Deprecated:** *Deprecated in Java.*  

### y

Added in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
var y: Float
```

**Deprecated:** *Deprecated in Java.*