Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8747199
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:19:03+00:00 2026-06-13T12:19:03+00:00

I found a code from internet and try to understand it. I don’t know

  • 0

I found a code from internet and try to understand it. I don’t know what is the programming language of the code and try to find javascript equivalencies or workarounds.

A) Which language is in question?


*a_offsetrot = PI / 4.0f;

B) What is the meaning of ‘*’ in above and what is the possible Javascript equivalence?

C) What is the meaning of ‘f’ and what is the possible Javascript equivalence?


if (K<0) K = 0; else K = (float)sqrt (K);

D) What is the meaning of ‘(float)’ and what is the possible Javascript equivalence?


*a_offsetrot = 0.5f * (float)atan2(B,ac);

E) What is the meaning of “atan2” and what is the possible Javascript equivalence?


void Ellipse_Transform (float * a_rh, float * a_rv, float *a_offsetrot, Vector2 * endpoint, matrix * a_mat, int *a_ReverseWinding)

F) What is the meaning of ‘Vector2 * endpoint’ and is there possible Javascript equivalence? Is Vector2 a thing that has two (x,y)-points or only one (x,y)-point?


m[0] = a_mat->m[0] * +rh * c + a_mat->m[3] * rh * s;

G) What is the meaning of ‘a_mat->m[0]’ and what is the possible Javascript equivalence?

EDIT: Updated title to be more meaningful.

EDIT2: Thanks to constructive answer of @rid I got the C language code translated to Javascript and it is HERE and full working functional example is HERE.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T12:19:04+00:00Added an answer on June 13, 2026 at 12:19 pm

    A) The language is C.

    B) * is the dereferencing operator. There is no equivalent in JavaScript, since JavaScript does not use pointers.

    C) The f in 4.0f indicates that the value is a float value. There is no equivalent in JavaScript, since in JavaScript all numeric values are represented as numbers.

    D) (float) is a type cast. Something similar in JavaScript is parseFloat() which will parse the argument and return a floating point number, but this is different from type casting, and there is no equivalent to type casting in JavaScript.

    E) atan2() is a math function for calculating the arctangent. You can find it in the standard JavaScript Math package.

    F) A Vector2 is most likely a structure that has two properties, an x property and a y property.

    G) a_mat->m[0] means the first element from the array m that is a property of a_mat. If a_mat was an object in JavaScript, the equivalent would be a_mat.m[0].

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I found the code from the net in which i cant understand this line:-
I found a lots of ways to call objective-c code from javascript, but I
I found this code from here: http://www.cssportal.com/form-elements/text-box.htm But the problem is you can still
Hi I found the following code from this page JQuery UI DatePicker using 2
I found some really great code from Matt Gallagher for use with making Undo
I found the following piece of code from the adw launcher: Object service =
I have adapted some code from a great article I found about circle drawing
I have found the example of using the local sockets . The code from
I found this code snippet to retrieve the title from a YouTube video and
I'm trying to parse a html doc using some code I found from this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.