Code Monkey home page Code Monkey logo

q_rsqrt_unity's Introduction

Q_rsqrt_Unity

Quake III Arena: Fast Inverse Square Root in Unity

The good or bad idea. IDK.

Since I have always been interested in the Quake III engine (id Tech 3) through Star Wars Jedi Knight II: Jedi Outcast and am a fan of the Fast Inverse Square Root Algorithm I thought it would be interesting to make the algorithm available in the UnityEngine. Apart from whether it makes sense or not, I just wanted to try it out. And so I started the experiment.

Installation

Windows

  1. Download the current release for Windows or compile it yourself if you want to.
  2. Just put the Q_rsqrt_Unity_DLL_x86.dll or Q_rsqrt_Unity_DLL_x64.dll in your Assets/Plugins folder in your Unity Project.
  3. Native plugins are typically bounded to a specific OS or platform. You can use the Unity Inspector to make sure each DLL is included in the right build.

Linux

Coming soon.

macOS

Coming soon.

Usage

  1. Import the Q3 namespace.
  2. Just call the static method float result = Qmath.Q_rsqrt(float number);
using UnityEngine;
using Q3;

public class Tester : MonoBehaviour
{
    public float testValue = 1f;

    private void Start()
    {
        float result = Qmath.Q_rsqrt(testValue);
        Debug.Log(result);
    }
}

Performance / Profiling

Coming soon.

q_rsqrt_unity's People

Contributors

laurence-trippen avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

classicvalues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.