Skip to content

Commit

Permalink
Merge pull request #41 from Jagerente/38-missing-quaternion-fields
Browse files Browse the repository at this point in the history
#38 Add missing Quaternion fields
  • Loading branch information
Jagerente authored Nov 30, 2024
2 parents 2c93110 + f82fa9e commit 6d36262
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions src/classes/QuaternionClass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,42 @@ export class QuaternionClass implements IClass {
parameters: [
{ name: 'v', type: 'Vector3', description: 'Euler angles as a Vector3.' }
]
},
{
label: 'LookRotation',
returnType: 'Quaternion',
description: 'Returns the Quaternion rotation with the specified forward and (optional) up Vector.',
parameters: [
{ name: 'forward', type: 'Vector3', description: 'Forward vector.' },
{ name: 'up', type: 'Vector3', description: 'Forward vector.', isOptional: true }
]
},
{
label: 'FromToRotation',
returnType: 'Quaternion',
description: 'Returns the Quaternion rotation with the specified forward and (optional) up Vector.',
parameters: [
{ name: 'from', type: 'Vector3', description: 'From vector.' },
{ name: 'to', type: 'Vector3', description: 'To vector.', isOptional: true }
]
},
{
label: 'Inverse',
returnType: 'Quaternion',
description: 'Returns the inverse of the given Quaternion.',
parameters: [
{ name: 'a', type: 'Quaternion', description: 'Quaternion to inverse.' }
]
},
{
label: 'RotateTowards',
returnType: 'Quaternion',
description: 'Returns the inverse of the given Quaternion.',
parameters: [
{ name: 'from', type: 'Quaternion', description: 'From Quaternion.' },
{ name: 'to', type: 'Quaternion', description: 'To Quaternion.' },
{ name: 'maxDegrees', type: 'float', description: 'Maximum degrees.' }
]
}
];
}
Expand Down

0 comments on commit 6d36262

Please sign in to comment.