to-float32

WebJar for to-float32

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

to-float32
Last Version

Last Version

1.0.1
Release Date

Release Date

Type

Type

jar
Description

Description

to-float32
WebJar for to-float32
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/dy/to-float32

Download to-float32

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/to-float32/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>to-float32</artifactId>
    <version>1.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/to-float32/
implementation 'org.webjars.npm:to-float32:1.0.1'
// https://jarcasting.com/artifacts/org.webjars.npm/to-float32/
implementation ("org.webjars.npm:to-float32:1.0.1")
'org.webjars.npm:to-float32:jar:1.0.1'
<dependency org="org.webjars.npm" name="to-float32" rev="1.0.1">
  <artifact name="to-float32" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='to-float32', version='1.0.1')
)
libraryDependencies += "org.webjars.npm" % "to-float32" % "1.0.1"
[org.webjars.npm/to-float32 "1.0.1"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

to-float32 unstable Build Status

Dirty little helper to convert array to float32 array or return round remainder of converting to float32. Useful for sending data to webgl buffers.

npm install to-float32

let {float32, fract32} = require('to-float32')

let data = Array.from({length: 1024}, Math.random)

// create float32 data
let buffer = float(data)

// get float32 remainders
let fractBuffer = fract32(data)

// convert number to float32
let f32 = float32(0.1) // 0.10000000149011612

// get float32 number remainder
let rem32 = fract32(0.1) //

Fract data is Float32Array with values calculated as origValue - float32value

License

(c) 2017 Dmitry Yv. MIT License

Versions

Version
1.0.1
1.0.0